Hi I have a small Java class which I'd like to embed into a mod_perl module. The class imports several packages from a .jar file. It works when embedded into a Perl CGI script, but not under mod_perl. It fails with a message like "package org.example.widget.document does not exist". The CLASSPATH is correct and the .jar files exist at the specified locations and are the same ones which work for the CGI script.
I'm using: Apache 2.0.54 with mod_perl 2.0, JDK 1.4.2. Inline::Java is 0.50; while building with perl Makefile.PL I said "yes" to building with JNI, "server" when there was a choice between server and client (apologies, I can't recall exactly what) and "no" to all the options. Anyone know what's going wrong and how I can fix it? The relevant log output is attached below. Thanks Jan Berwich __START__ [perl][1] validate done. [perl][1] Starting build. [perl][4] portable: ENV_VAR_PATH_SEP_CP for linux is default ':' [perl][4] portable: SUB_FIX_JAVA_PATH => /usr/data/www/java/example-1.4.3.jar for linux is default '/usr/data/www/java/example-1.4.3.jar' [perl][4] portable: SUB_FIX_JAVA_PATH => /usr/data/www/java/example-widget-1.9-rc1-dev.jar for linux is default '/usr/data/www/java/example-widget-1.9-rc1-dev.jar' [perl][4] portable: SUB_FIX_JAVA_PATH => /usr/lib/perl5/site_perl/5.8.5/i586-linux-thread-multi/Inline/Java/InlineJavaServer.jar for linux is default '/usr/lib/perl5/site_perl/5.8.5/i586-linux-thread-multi/Inline/Java/InlineJavaServer.jar' [perl][2] classpath: /usr/data/www/java/example-1.4.3.jar:/usr/data/www/java/example-widget-1.9-rc1-dev.jar:/usr/lib/perl5/site_perl/5.8.5/i586-linux-thread-multi/Inline/Java/InlineJavaServer.jar [perl][4] portable: EXE_EXTENSION for linux is default '' [perl][4] portable: IO_REDIR for linux is default '2>&1' [perl][4] portable: SUB_FIX_JAVA_PATH => /tmp/lib/auto/java_5624 for linux is default '/tmp/lib/auto/java_5624' [perl][4] portable: SUB_FIX_CMD_QUOTES => "/usr/bin/javac" -deprecation -d "/tmp/lib/auto/java_5624" QueryTest.java > cmd.out 2>&1 for linux is default '"/usr/bin/javac" -deprecation -d "/tmp/lib/auto/java_5624" QueryTest.java > cmd.out 2>&1' [perl][2] "/usr/bin/javac" -deprecation -d "/tmp/lib/auto/java_5624" QueryTest.java > cmd.out 2>&1 [Sun Jul 31 23:57:06 2005] [error] [client 192.168.1.99] failed to resolve handler `java': \nA problem was encountered while attempting to compile and install your Inline\nJava code. The command that failed was:\n "/usr/bin/javac" -deprecation -d "/tmp/lib/auto/java_5624" QueryTest.java > cmd.out 2>&1\n\nThe build directory was:\n/tmp/build/java_5624\n\nThe error message was:\nQueryTest.java:1: package org.example.widget.document does not exist\nimport org.example.widget.Document;\n __END__