blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:
I have a jar file that I have put a slew of class files in with one of those being a singleton class that does all sorts of magical things for me.
I try to instantiate that singleton from within JavaInline by doing something rather simple (sort of) as a proof of concept. So here's some code:
What I'm seeing instead of the person's name in the database who's person_id is 1 is:#!/usr/bin/perl -w use Inline Java => << 'End_Of_Java_Code'; import org.bcdc.hbm.services.*; class FooBar { public PeopleService getPersonService() { return PeopleService.getInstance(); } } End_Of_Java_Code use Data::Dumper; my $foo = new FooBar(); $foo -> setThing("This is thing!"); $foo -> setOtherThing(17); my $psvc = $foo->getPersonService(); printf "%s\n",$psvc->getPersonNameFromID(1);
main::java::lang::NoClassDefFoundError=HASH(0x8f530e4)
It would appear the singleton is not being instantiated. Any ideas folks?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inline::Java and jar files?
by mpeters (Chaplain) on May 01, 2007 at 01:07 UTC | |
by blue_cowdawg (Monsignor) on May 01, 2007 at 05:00 UTC | |
by philcrow (Priest) on May 01, 2007 at 13:05 UTC | |
by blue_cowdawg (Monsignor) on May 01, 2007 at 16:00 UTC | |
by Anonymous Monk on May 01, 2007 at 05:59 UTC | |
|
SOLUTION (was Re: Inline::Java and jar files?)
by blue_cowdawg (Monsignor) on May 01, 2007 at 22:43 UTC |