(I'm CCing Inline so help stays in the archives for people with similar
problems down the line)
Ok, so you're using RedHat 7.2 and Apache. What it looks like is you have a
mod_perl module called "PerlRun" loaded, which emulates a CGI environment
and allows for caching of the modules. This may be the root of your
problem, if you are trying to run Inline::Java as if you have a CGI...
Try changing the line that says "Inline::Java::release_JVM();" to
"Inline::Java::reconnect_JVM();"; I've found this to be the most effective
method of including Inline::Java in mod_perl applications.
If that fails, try running the DEBUG trace - it will give you an idea of why
things are failing.
-Brendan
----- Original Message -----
From: "Irfan Ahmed" <[EMAIL PROTECTED]>
To: "Brendan W. McAdams" <[EMAIL PROTECTED]>
Sent: Friday, 31 May, 2002 06:43
Subject: Re: Inline::Java
> Hi,
>
> I am using Linux 7.2 and apache. and I have a virtual server.
>
>
> ----- Original Message -----
> From: "Brendan W. McAdams" <[EMAIL PROTECTED]>
> To: "Irfan Ahmed" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, May 31, 2002 2:37 PM
> Subject: Re: Inline::Java
>
>
> > Running a debug trace should give us an idea of what is going on when
you
> > try to run the CGI however; it's the best place to start.
> >
> > I notice a "PerlRun" module; It seems passingly familiar but I can't
place
> > it.
> >
> > Are you using Apache? What platform? I assume you aren't using the
> > standard CGI environment?
> >
> >
> > ----- Original Message -----
> > From: "Irfan Ahmed" <[EMAIL PROTECTED]>
> > To: "Brendan W. McAdams" <[EMAIL PROTECTED]>
> > Sent: Friday, 31 May, 2002 06:32
> > Subject: Re: Inline::Java
> >
> >
> > > Hi,
> > > I am getting error from web, when accessing the file from web. In
> > > console its running fine.
> > >
> > > Any help
> > >
> > > Regards
> > >
> > > ----- Original Message -----
> > > From: "Brendan W. McAdams" <[EMAIL PROTECTED]>
> > > To: "Irfan Ahmed" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Friday, May 31, 2002 2:25 PM
> > > Subject: Re: Inline::Java
> > >
> > >
> > > > Can you turn on DEBUG and get a trace?
> > > >
> > > > Your Inline block would look like this:
> > > > use Inline (
> > > > Java => <<'END_OF_JAVA_CODE' ,
> > > >
> > > > class Pod_alu {
> > > > public Pod_alu(){
> > > > }
> > > >
> > > > public int add(int i, int j){
> > > > return i + j ;
> > > > }
> > > >
> > > > public int subtract(int i, int j){
> > > > return i - j ;
> > > > }
> > > > }
> > > > END_OF_JAVA_CODE
> > > >
> > > > SHARED_JVM => 1,
> > > > BIN => '/usr/java/j2sdk1.4.0/bin' ,
> > > > DEBUG => 1
> > > > );
> > > >
> > > > ----- Original Message -----
> > > > From: "Irfan Ahmed" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Friday, 31 May, 2002 05:34
> > > > Subject: Inline::Java
> > > >
> > > >
> > > > The error I am getting in using Inline::Java from web is.
> > > >
> > > > [Fri May 31 02:00:33 2002] [error] [client 203.81.200.4] File does
not
> > > > exist: /home/zapmeta/public_html/500.shtml
> > > > [Fri May 31 02:00:33 2002] [error] PerlRun: `Can't locate object
> method
> > > > "new" via package "Pod_alu" (perhaps you forgot to load "Pod_alu"?)
at
> > > > /home/zapmeta/public_html/cgi-bin/zapmeta/hh.pl line 32.
> > > >
> > > > and the code I am using is.
> > > >
> > > > #!/usr/bin/perl
> > > >
> > > > print "Content-type: text/html \n\n";
> > > >
> > > >
> > > >
> > > > use Inline (
> > > > Java => <<'END_OF_JAVA_CODE' ,
> > > >
> > > > class Pod_alu {
> > > > public Pod_alu(){
> > > > }
> > > >
> > > > public int add(int i, int j){
> > > > return i + j ;
> > > > }
> > > >
> > > > public int subtract(int i, int j){
> > > > return i - j ;
> > > > }
> > > > }
> > > > END_OF_JAVA_CODE
> > > >
> > > > SHARED_JVM => 1,
> > > > BIN => '/usr/java/j2sdk1.4.0/bin' ,
> > > >
> > > > );
> > > >
> > > > Inline::Java::release_JVM();
> > > > print "hello";
> > > >
> > > > my $alu = new Pod_alu();
> > > > print($alu->add(9, 16) . "\n") ; # prints 25
> > > > print($alu->subtract(9, 16) . "\n") ; # prints -7
> > > >
> > > > Any idea why this error is generating.
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
>
>