Dear fellow monks,

I have a strange problem with a program where I use Inline::Java. I just reopened it in Padre after some months of not touching it and suddenly I get strange errors like the following:

$ perl -c lari.pl lari.pl syntax OK (in cleanup) In method DESTROY of class main::org::apache::log4j:: +Logger: Can't find object 0 for thread IJST-#0 at /home/alex/perl5/li +b/perl5/x86_64-linux-gnu-thread-multi/Inline/Java/Object.pm line 357 +at lari.pl line 0 ... (in cleanup) Unknown Java object reference main::org::apache::log4 +j::Logger=HASH(0x17d88c0) at lari.pl line 0

I get similar errors for some other jars / Java classes. The weird thing now is that the exact same program is still running fine on the server, while I can't get it running on my machine. I looked at both the server and my computer and these are the stats for them

server:
- perl, v5.10.0 built for x86_64-linux-thread-multi
- Inline::Java version 0.53
- JAVA
- java version "1.6.0_21"
- Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
- Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)

my machine:
- perl 5, version 12, subversion 4 (v5.12.4) built for x86_64-linux-gnu-thread-multi (with 45 registered patches, see perl -V for more detail)
- Inline::Java version 0.53
- JAVA
- java version "1.6.0_30"
- Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
- Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)

Both times I use the same jars containing the relevant Java code.

This is the relevant part of my code, where I call Inline::Java

# set the java classpath (it is assumed that the jars are in the same +folder as this script) BEGIN { $ENV{CLASSPATH} .= ":.:lari_typecheck.jar:log4j-1.2.14.jar:postgre +sql8jdbc3.jar"; } # use Inline::Java and tell it to study the classes that will be used use Inline Java => 'STUDY', STUDY => ['lari_typecheck.ArchiveObject', 'org.apache.log4j.Logger', ], AUTOSTUDY => 1;

I have no idea what is going on here. I really hope one of you can help me figuring this out.

greetings Alex

In reply to Inline::Java stopped working by kreetrapper

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.