I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-03-27 00:08:18-07 by megamic
Inline::Java hangs
Hi I have been using Inline::Java successfully for some some, however quite recently my Perl script seems unable to communicate with the JVM. I use Inline::Java like this (the debug only for this test):
use Inline ( Java => 'STUDY' ,SHARED_JVM => 1 ,DEBUG => 2 ,CLASSPATH => 'localtokenservices.jar:itsec-dto-common.jar:commons-logging.jar' ,STUDY => ['a.particular.class'] );

I dont actually write any java myself, I use the STUDY option to identify the class I am after. I am running under Solaris 10, perl 5.8.4, JVM 1.5.0_06-b05. This is the DEBUG level 2 output when I try and create a java object, then call a method in it. Note the two line starting with '**' are my own output indicating when im about to create the object, and call the method. Note that the object seem to be created OK, but when I make the method call it just hangs for several minutes until 'Killed' is displayed:
[perl][1] validate done. [perl][1] Starting load. [perl][2] classpath: /export/home/db9/sqllib/java/db2java.zip:/export/home/db9/sqllib/java/db2jcc. +jar:/export/home/db9/sqllib/java/sqlj.zip:/export/home/db9/sqllib/function:/export/home/db9/sqllib +/java/db2jcc_license_cu.jar:/home/mpl430/work/revgeo:/data/edw/scripts/perl5lib/sun4-solaris-64int +/Inline/Java/InlineJavaServer.jar [perl][1] starting JVM... [perl][1] client/server mode [perl][2] "/usr/java/bin/java" org.perl.inline.java.InlineJavaServer 2 localhost 7891 true false +false [perl][2] classpath: /export/home/db9/sqllib/java/db2java.zip:/export/home/db9/sqllib/java/db2jcc. +jar:/export/home/db9/sqllib/java/sqlj.zip:/export/home/db9/sqllib/function:/export/home/db9/sqllib +/java/db2jcc_license_cu.jar:. [perl][2] adding to classpath: '/data/edw/scripts/perl5lib/sun4-solaris-64int/Inline/Java/InlineJa +vaUser.jar' [java][2] added file:/data/edw/scripts/perl5lib/sun4-solaris-64int/Inline/Java/InlineJavaUser.jar +to classpath [perl][2] classpath candidate '' scraped [perl][2] adding to classpath: '/home/mpl430/work/revgeo/_Inline/lib/auto/inlineJ_0295' [perl][2] adding to classpath: '/home/mpl430/work/revgeo/localtokenservices.jar' [perl][2] adding to classpath: '/home/mpl430/work/revgeo/itsec-dto-common.jar' [perl][2] adding to classpath: '/home/mpl430/work/revgeo/commons-logging.jar' [java][2] added file:/home/mpl430/work/revgeo/_Inline/lib/auto/inlineJ_0295/ to classpath [java][2] added file:/home/mpl430/work/revgeo/localtokenservices.jar to classpath [java][2] added file:/home/mpl430/work/revgeo/itsec-dto-common.jar to classpath [java][2] added file:/home/mpl430/work/revgeo/commons-logging.jar to classpath [perl][1] using jdat cache [perl][2] creating object in java [perl][1] load done. ** CLASS CREATE [java][1] loading InlineJavaUserClassLink via InlineJavaUserClassLoader ** METHOD CALL Killed

Note that this particular script was working and has been working for some time, and to my knowledge there have been no software changes or anything. To be sure I deleted my _Inline and let inline rebuild it, however it didnt help.
Any help or advice?
Cheers
Direct Responses: 7509 | Write a response