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 2011-10-31 11:58:29.711483-07 by mysta
(in cleanup) Unknown Java object reference
Trying to figure out why my code generates an internal error. When I run perl script.pl(With just the code) it compiles fine. When I run with perl -wc script.pl I get: test.pl syntax OK (in cleanup) In method DESTROY of class main::sample::appsforyourdomain::AppsForYourDomainClient: Can't find object 0 for thread IJST-#0 at /usr/opt/perl5/lib/site_perl/5.8.2/Inline/Java/Object.pm line 357 at test.pl line 0 (in cleanup) Unknown Java object reference main::sample::appsforyourdomain::AppsForYourDomainClient=HASH(0x303479b8) at test.pl line 0
BEGIN { my $libdir='/opt/tools/gims/css'; my @jars=(); opendir LIBDIR,$libdir or die $1; while( my $fname = readdir(LIBDIR)){ next unless $fname =~ m@\.jar$@; push @jars,$libdir . "/" . $fname; } $ENV{CLASSPATH} .= join(":",@jars,"/opt/tools/gims/css/appsforyourdomain.jar"); } use Inline ( Java => 'STUDY', CLASSPATH => '$ENV{CLASSPATH}', STUDY => ['sample.appsforyourdomain.AppsForYourDomainClient'], AUTOSTUDY => 1 , ) ; my $client = new sample::appsforyourdomain::AppsForYourDomainClient("$googu", "$googp", "$googd"); my $getacct = $client->retrieveUser($useresult);
I do know that the object it refers to is what is returned as $client
Direct Responses: 13532 | Write a response
Posted on 2011-10-31 17:25:17.786567-07 by mysta in response to 13531
Re: (in cleanup) Unknown Java object reference
I did end up figuring out what was causing this, it was the STUDY that was generating the hash object for some reason, I've added study classes instead and it's now past that. However I do have problem building a page. I believe it's because the API has logging embedded and in the class when you call 'retrieveUser' it outputs "user is 'blah'". Breaking the overall page(I think?) Internal 500 error. Any way to get rid of this without modifying the class?
Direct Responses: 13533 | Write a response
Posted on 2011-10-31 18:47:04.598041-07 by patl in response to 13532
Re: (in cleanup) Unknown Java object reference
Try adding java.lang.System to your studied classes, and then you can call:
$java::lang::System::out->close() ;
to close the stdout on the Java side.
Direct Responses: 13534 | Write a response
Posted on 2011-10-31 20:56:51.695209-07 by mysta in response to 13533
Re: (in cleanup) Unknown Java object reference
Doesn't seem to work, it's using java.util.logging if that helps any.
Direct Responses: 13535 | Write a response
Posted on 2011-11-01 08:50:36.970917-07 by mysta in response to 13534
Re: (in cleanup) Unknown Java object reference
Apparently that wasn't the issue that is causing the internal server error. I modified the api files and removed the logging but it still occurse. Anything special I need to do for Inline::Java to run on a webpage pl script?
Direct Responses: 13536 | Write a response
Posted on 2011-11-01 11:11:54.922767-07 by patl in response to 13535
Re: (in cleanup) Unknown Java object reference
What do the web server logs say?
Direct Responses: 13542 | Write a response
Posted on 2011-11-06 20:25:18.728178-08 by mysta in response to 13536
Re: (in cleanup) Unknown Java object reference
Was finally able to get to see the web server logs, after a few permissions corrections, and correcting the #! at the top(it was pointing to old version of perl when I was running perl blah.pl of course it was compiling with new, which was the difference in the two scenarios) Just thought i'd update.
Direct Responses: Write a response