I've been trying to do something similar, but with Inline::Java.

I can get a proxy module to bridge between my perl application to java code
inside a jar, but when I try to deploy this same code as a web application,
it bombs out with errors like:

[Wed Apr 21 22:17:33 2004] [error] Can't exec JVM: open3: Can't call method
"close" on an undefined value at
c:\usr\local\lib\perl-5.6.1\lib/IPC/Open3.pm line 335.

the whacky path should give you a clue that this is perl 5.6.1, on windows.
the server is: Apache/1.3.27 (Win32) mod_perl/1.27_01-dev

What I can't figure is why the same config would work standalone, but not
under mod_perl.

I've checked everything I can think of, including the environment, PATH and
CLASSPATH, even to the point of debugging inside JVM.pm.

fwiw, i've taken it to the point in Open3.pm where the line:

     $fd->{tmp_copy} = IO::Handle->new_from_fd($fd->{handle}, $fd->{mode});

appears to fail, returning null,  errno says $fd is a bad file descriptor.

now I'm wondering should Inline::Java even be expected to work under
mod_perl?

thanks,

A. Lowe

"Roger Moffatt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I'm integrating a C API with my mod_perl application which runs using
> Apache::Registry as it is a recent port from a standard CGI environment.
>
> I've got things to work MOST of the time by using the following
> configuration;
>
> use strict;
> use CGI;
> use Crypt::SKey qw(compute_md5);
>
> use Inline ( C=>'/var/www/perl/clipmail.c',
> AUTO_INCLUDE=>'#include "/var/www/perl/API.h"',
> DIRECTORY => '/var/www/perl/_Inline/',
> ENABLE => 'UNTAINT' );
>
> With all my C code in the clipmail.c file and the _Inline directory
> configured so apache can read and write to it.
>
> My problem is that if I leave the browser for a while and then come back
and
> use it again, I get a server 500 error and looking in my error logs I get
an
> entry as follows NOTE that the _inline directory option listed in the
error
> IS NOT the same as the one I actually am using which starts with a capital
> "I";
>
> >> ModPerl::Registry Invalid value '/var/www/perl/_inline' for config
option
> DIRECTORY  ... blah compilation aborted.
>
> I don't quite understand this, I am specifying which directory to use -
and
> it's not that one!! I'm suspecting this is something to do with
persistance
> and the way mod_perl under Apache::Registry works - I wonder if the error
is
> cropping up when a new child process is spawned and maybe mod_perl is
trying
> to re-compile the C code but for some reason is ignoring the config
> option???
>
> Any help much appreciated
>
> Regards
> Roger Moffatt
> UK
>
>
>
>


Reply via email to