Thread

Posted on Thu Mar 27 02:08:18 2008 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
Posted on Sun Mar 30 12:30:10 2008 by chrei in response to 7474
Re: Inline::Java hangs
Hi, did you observe abnormal resource consumption during the period when Inline::Java seems to hang, in other words: Is some process running wild (with 99% CPU consumption) or do you see the memory footprint of some process building up until some limit is exceeded and the system is forced to abort the process? When a lone "killed" messages appears it is also often helpful to consult the system logs in /var/log or whereever they are on your system. If the OS itself was forced to kill the process it usually logs the fact together with the reasons for it to those logs. This might not solve your problem at once but it would be an important information. Christian
Write a response