Skip Menu |

This queue is for tickets about the Inline-Java CPAN distribution.

Report information
The Basics
Id: 21513
Status: resolved
Priority: 0/
Queue: Inline-Java

People
Owner: patl [...] cpan.org
Requestors: joe.workman [...] gs.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Java Object not properly created
First a disclaimer: I am new to Inline::Java and the JDBC module, and do not know Java. This may be a bug in Inline::Java but but I thought I would log the bug here since I can not even make a connection to a database via JDBC. I will also log the bug in JDBC but I think its a issue with Inline::Java. Environment: Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 perl v5.8.6 Inline::Java v0.51 JDBC v0.01 The Runtime Error: 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception 09-15-2006 11:04:44 INFO: Version : 1.0 09-15-2006 11:04:44 INFO: Pid : 2825 09-15-2006 11:04:44 INFO: Loglevel : 4 09-15-2006 11:04:44 INFO: Cmd Line : 09-15-2006 11:04:44 INFO: Loading driver . . . 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- multi/Inline/Java/Object.pm line 107 09-15-2006 11:04:44 FATAL: Processing aborted! The Code: use JDBC; sub connect_to_daffodil { $_log->info('Loading driver . . . '); JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); $_log->info('Successfully loaded daffodil driver!!'); my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; my $user = 'DAFFODIL'; my $pass = 'daff0d1l'; $_log->info('Connecting to daffodil . . . '); my $con = JDBC->getConnection($url, $user, $pass); $_log->info('Successfully connected to daffodil!!'); return $con; } Notes: As you can see, I am just trying to make a basic connection to a Daffodil database via JDBC. The code seem identical to the example in the POD. Maybe there has been a change in Inline::Java that broke JDBC? Dubugging: I hope that soem of thsi debugging may help in find the solution. After looking into Inline::Java::Object the problem is apparently a problem with the $args variable when Inline::Java::Class::CastArguments is called. While digging a little further I see that it has to do with $args and the $protos->key- Show quoted text
>signature in this method do not have the same number of elements
(args has 3 was the signature of the first proto only has 1). args:$VAR1 = [ 'jdbc:daffodilDB://localhost:3456/ovaa', 'DAFFODIL', 'daff0d1l' ]; protos:$VAR1 = { 'java.lang.String' => { 'STATIC' => 1, 'IDX' => 568, 'SIGNATURE' => [ 'java.lang.String' ] }, 'java.lang.String, java.lang.String, java.lang.String' => { ' STATIC' => 1, ' IDX' => 569, ' SIGNATURE' => [ 'java.lang.String', 'java.lang.String', 'java.lang.String' ] }, 'java.lang.String, java.util.Properties' => { 'STATIC' => 1, 'IDX' => 567, 'SIGNATURE' => [ 'java.lang.String', 'java.util.Properties' ] } }; I then traced this back to the bind_method in Java.pm where the __validate_protype mehtod is called. But this is where I am currently stuck. I understand the code but following it at this point is tricky.
Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Fri, 15 Sep 2006 08:52:59 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" and re-run your script? You should get a LOT of debugging info about what Inline::Java is trying to do. From that debug info we should be albe to tell what method is in error, how many argument have been passed and how many arguments Inline::Java thinks the method has. Patrick On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > Transaction: Ticket created by josephworkman > Queue: Inline-Java > Subject: Java Object not properly created > Broken in: (no value) > Severity: Important > Owner: Nobody > Requestors: joe.workman@gs.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > First a disclaimer: > I am new to Inline::Java and the JDBC module, and do not know Java. > This may be a bug in Inline::Java but but I thought I would log the > bug here since I can not even make a connection to a database via > JDBC. I will also log the bug in JDBC but I think its a issue with > Inline::Java. > > Environment: > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > perl v5.8.6 > Inline::Java v0.51 > JDBC v0.01 > > The Runtime Error: > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > 09-15-2006 11:04:44 INFO: Version : 1.0 > 09-15-2006 11:04:44 INFO: Pid : 2825 > 09-15-2006 11:04:44 INFO: Loglevel : 4 > 09-15-2006 11:04:44 INFO: Cmd Line : > 09-15-2006 11:04:44 INFO: Loading driver . . . > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > multi/Inline/Java/Object.pm line 107 > 09-15-2006 11:04:44 FATAL: Processing aborted! > > The Code: > use JDBC; > sub connect_to_daffodil { > $_log->info('Loading driver . . . '); > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > $_log->info('Successfully loaded daffodil driver!!'); > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > my $user = 'DAFFODIL'; > my $pass = 'daff0d1l'; > > $_log->info('Connecting to daffodil . . . '); > my $con = JDBC->getConnection($url, $user, $pass); > $_log->info('Successfully connected to daffodil!!'); > return $con; > } > > Notes: > > As you can see, I am just trying to make a basic connection to a > Daffodil database via JDBC. The code seem identical to the example in > the POD. Maybe there has been a change in Inline::Java that broke > JDBC? > > Dubugging: > > I hope that soem of thsi debugging may help in find the solution. > After looking into Inline::Java::Object the problem is apparently a > problem with the $args variable when > Inline::Java::Class::CastArguments is called. While digging a little > further I see that it has to do with $args and the $protos->key- >
> >signature in this method do not have the same number of elements
> > (args has 3 was the signature of the first proto only has 1). > > args:$VAR1 = [ > 'jdbc:daffodilDB://localhost:3456/ovaa', > 'DAFFODIL', > 'daff0d1l' > ]; > protos:$VAR1 = { > 'java.lang.String' => { > 'STATIC' => 1, > 'IDX' => 568, > 'SIGNATURE' => [ > 'java.lang.String' > ] > }, > 'java.lang.String, java.lang.String, java.lang.String' => { > ' > STATIC' => 1, > ' > IDX' => 569, > ' > SIGNATURE' => [ > > 'java.lang.String', > > 'java.lang.String', > > 'java.lang.String' > > ] > }, > 'java.lang.String, java.util.Properties' => { > 'STATIC' => 1, > 'IDX' => 567, > 'SIGNATURE' => > [ > > 'java.lang.String', > > 'java.util.Properties' > > ] > } > }; > > > I then traced this back to the bind_method in Java.pm where the > __validate_protype mehtod is called. But this is where I am currently > stuck. I understand the code but following it at this point is tricky. >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: RE: [rt.cpan.org #21513] Java Object not properly created
Date: Fri, 15 Sep 2006 14:08:39 +0100
To: <bug-Inline-Java [...] rt.cpan.org>
From: "Workman, Joe" <joe.workman [...] gs.com>
Thanks for they speedy response. I really appreciate it! Here is the output from the debug. Cheers Joe Show quoted text
-----Original Message----- From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] Sent: Friday, September 15, 2006 1:53 PM To: Workman, Joe Subject: Re: [rt.cpan.org #21513] Java Object not properly created <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > Joe, Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" and re-run your script? You should get a LOT of debugging info about what Inline::Java is trying to do. From that debug info we should be albe to tell what method is in error, how many argument have been passed and how many arguments Inline::Java thinks the method has. Patrick On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > Transaction: Ticket created by josephworkman > Queue: Inline-Java > Subject: Java Object not properly created > Broken in: (no value) > Severity: Important > Owner: Nobody > Requestors: joe.workman@gs.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > First a disclaimer: > I am new to Inline::Java and the JDBC module, and do not know Java. > This may be a bug in Inline::Java but but I thought I would log the > bug here since I can not even make a connection to a database via > JDBC. I will also log the bug in JDBC but I think its a issue with > Inline::Java. > > Environment: > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > perl v5.8.6 > Inline::Java v0.51 > JDBC v0.01 > > The Runtime Error: > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > 09-15-2006 11:04:44 INFO: Version : 1.0 > 09-15-2006 11:04:44 INFO: Pid : 2825 > 09-15-2006 11:04:44 INFO: Loglevel : 4 > 09-15-2006 11:04:44 INFO: Cmd Line : > 09-15-2006 11:04:44 INFO: Loading driver . . . > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > multi/Inline/Java/Object.pm line 107 > 09-15-2006 11:04:44 FATAL: Processing aborted! > > The Code: > use JDBC; > sub connect_to_daffodil { > $_log->info('Loading driver . . . '); > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > $_log->info('Successfully loaded daffodil driver!!'); > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > my $user = 'DAFFODIL'; > my $pass = 'daff0d1l'; > > $_log->info('Connecting to daffodil . . . '); > my $con = JDBC->getConnection($url, $user, $pass); > $_log->info('Successfully connected to daffodil!!'); > return $con; > } > > Notes: > > As you can see, I am just trying to make a basic connection to a > Daffodil database via JDBC. The code seem identical to the example in > the POD. Maybe there has been a change in Inline::Java that broke > JDBC? > > Dubugging: > > I hope that soem of thsi debugging may help in find the solution. > After looking into Inline::Java::Object the problem is apparently a > problem with the $args variable when > Inline::Java::Class::CastArguments is called. While digging a little > further I see that it has to do with $args and the $protos->key- >
> >signature in this method do not have the same number of elements
> > (args has 3 was the signature of the first proto only has 1). > > args:$VAR1 = [ > 'jdbc:daffodilDB://localhost:3456/ovaa', > 'DAFFODIL', > 'daff0d1l' > ]; > protos:$VAR1 = { > 'java.lang.String' => { > 'STATIC' => 1, > 'IDX' => 568, > 'SIGNATURE' => [ > 'java.lang.String' > ] > }, > 'java.lang.String, java.lang.String, java.lang.String' => { > ' > STATIC' => 1, > ' > IDX' => 569, > ' > SIGNATURE' => [ > > 'java.lang.String', > > 'java.lang.String', > > 'java.lang.String' > > ] > }, > 'java.lang.String, java.util.Properties' => { > 'STATIC' => 1, > 'IDX' => 567, > 'SIGNATURE' => > [ > > 'java.lang.String', > > 'java.util.Properties' > > ] > } > }; > > > I then traced this back to the bind_method in Java.pm where the > __validate_protype mehtod is called. But this is where I am currently > stuck. I understand the code but following it at this point is tricky. >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Download dump.gz
application/x-gzip 2.3m

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Fri, 15 Sep 2006 21:23:30 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, I would like to try an reproduce the bug on my station. Can you send me the Daffodil classes or are they proprietary? If they are, can you reproduce the bug with another JDBC driver? Patrick On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Friday, September 15, 2006 1:53 PM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > and re-run your script? > > You should get a LOT of debugging info about what Inline::Java is trying to do. > From that debug info we should be albe to tell what method is in error, how many > argument have been passed and how many arguments Inline::Java thinks the method > has. > > Patrick > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > Transaction: Ticket created by josephworkman > > Queue: Inline-Java > > Subject: Java Object not properly created > > Broken in: (no value) > > Severity: Important > > Owner: Nobody > > Requestors: joe.workman@gs.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > First a disclaimer: > > I am new to Inline::Java and the JDBC module, and do not know Java. > > This may be a bug in Inline::Java but but I thought I would log the > > bug here since I can not even make a connection to a database via > > JDBC. I will also log the bug in JDBC but I think its a issue with > > Inline::Java. > > > > Environment: > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > perl v5.8.6 > > Inline::Java v0.51 > > JDBC v0.01 > > > > The Runtime Error: > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > 09-15-2006 11:04:44 INFO: Cmd Line : > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > multi/Inline/Java/Object.pm line 107 > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > The Code: > > use JDBC; > > sub connect_to_daffodil { > > $_log->info('Loading driver . . . '); > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > $_log->info('Successfully loaded daffodil driver!!'); > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > my $user = 'DAFFODIL'; > > my $pass = 'daff0d1l'; > > > > $_log->info('Connecting to daffodil . . . '); > > my $con = JDBC->getConnection($url, $user, $pass); > > $_log->info('Successfully connected to daffodil!!'); > > return $con; > > } > > > > Notes: > > > > As you can see, I am just trying to make a basic connection to a > > Daffodil database via JDBC. The code seem identical to the example in > > the POD. Maybe there has been a change in Inline::Java that broke > > JDBC? > > > > Dubugging: > > > > I hope that soem of thsi debugging may help in find the solution. > > After looking into Inline::Java::Object the problem is apparently a > > problem with the $args variable when > > Inline::Java::Class::CastArguments is called. While digging a little > > further I see that it has to do with $args and the $protos->key- > >
> > >signature in this method do not have the same number of elements
> > > > (args has 3 was the signature of the first proto only has 1). > > > > args:$VAR1 = [ > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > 'DAFFODIL', > > 'daff0d1l' > > ]; > > protos:$VAR1 = { > > 'java.lang.String' => { > > 'STATIC' => 1, > > 'IDX' => 568, > > 'SIGNATURE' => [ > > 'java.lang.String' > > ] > > }, > > 'java.lang.String, java.lang.String, java.lang.String' => { > > ' > > STATIC' => 1, > > ' > > IDX' => 569, > > ' > > SIGNATURE' => [ > > > > 'java.lang.String', > > > > 'java.lang.String', > > > > 'java.lang.String' > > > > ] > > }, > > 'java.lang.String, java.util.Properties' => { > > 'STATIC' => 1, > > 'IDX' => 567, > > 'SIGNATURE' => > > [ > > > > 'java.lang.String', > > > > 'java.util.Properties' > > > > ] > > } > > }; > > > > > > I then traced this back to the bind_method in Java.pm where the > > __validate_protype mehtod is called. But this is where I am currently > > stuck. I understand the code but following it at this point is tricky. > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > > > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: RE: [rt.cpan.org #21513] Java Object not properly created
Date: Mon, 18 Sep 2006 10:22:48 +0100
To: <bug-Inline-Java [...] rt.cpan.org>
From: "Workman, Joe" <joe.workman [...] gs.com>
We are using the Open-source daffodil db called One$DB. You can download a version from here: http://www.daffodildb.com/one-dollar-db.html I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. Cheers Joe Show quoted text
-----Original Message----- From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] Sent: Saturday, September 16, 2006 2:24 AM To: Workman, Joe Subject: Re: [rt.cpan.org #21513] Java Object not properly created <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > Joe, I would like to try an reproduce the bug on my station. Can you send me the Daffodil classes or are they proprietary? If they are, can you reproduce the bug with another JDBC driver? Patrick On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Friday, September 15, 2006 1:53 PM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > and re-run your script? > > You should get a LOT of debugging info about what Inline::Java is trying to do. > From that debug info we should be albe to tell what method is in error, how many > argument have been passed and how many arguments Inline::Java thinks the method > has. > > Patrick > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > Transaction: Ticket created by josephworkman > > Queue: Inline-Java > > Subject: Java Object not properly created > > Broken in: (no value) > > Severity: Important > > Owner: Nobody > > Requestors: joe.workman@gs.com > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > First a disclaimer: > > I am new to Inline::Java and the JDBC module, and do not know Java. > > This may be a bug in Inline::Java but but I thought I would log the > > bug here since I can not even make a connection to a database via > > JDBC. I will also log the bug in JDBC but I think its a issue with > > Inline::Java. > > > > Environment: > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > perl v5.8.6 > > Inline::Java v0.51 > > JDBC v0.01 > > > > The Runtime Error: > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > 09-15-2006 11:04:44 INFO: Cmd Line : > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > multi/Inline/Java/Object.pm line 107 > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > The Code: > > use JDBC; > > sub connect_to_daffodil { > > $_log->info('Loading driver . . . '); > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > $_log->info('Successfully loaded daffodil driver!!'); > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > my $user = 'DAFFODIL'; > > my $pass = 'daff0d1l'; > > > > $_log->info('Connecting to daffodil . . . '); > > my $con = JDBC->getConnection($url, $user, $pass); > > $_log->info('Successfully connected to daffodil!!'); > > return $con; > > } > > > > Notes: > > > > As you can see, I am just trying to make a basic connection to a > > Daffodil database via JDBC. The code seem identical to the example in > > the POD. Maybe there has been a change in Inline::Java that broke > > JDBC? > > > > Dubugging: > > > > I hope that soem of thsi debugging may help in find the solution. > > After looking into Inline::Java::Object the problem is apparently a > > problem with the $args variable when > > Inline::Java::Class::CastArguments is called. While digging a little > > further I see that it has to do with $args and the $protos->key- > >
> > >signature in this method do not have the same number of elements
> > > > (args has 3 was the signature of the first proto only has 1). > > > > args:$VAR1 = [ > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > 'DAFFODIL', > > 'daff0d1l' > > ]; > > protos:$VAR1 = { > > 'java.lang.String' => { > > 'STATIC' => 1, > > 'IDX' => 568, > > 'SIGNATURE' => [ > > 'java.lang.String' > > ] > > }, > > 'java.lang.String, java.lang.String, java.lang.String' => { > > ' > > STATIC' => 1, > > ' > > IDX' => 569, > > ' > > SIGNATURE' => [ > > > > 'java.lang.String', > > > > 'java.lang.String', > > > > 'java.lang.String' > > > > ] > > }, > > 'java.lang.String, java.util.Properties' => { > > 'STATIC' => 1, > > 'IDX' => 567, > > 'SIGNATURE' => > > [ > > > > 'java.lang.String', > > > > 'java.util.Properties' > > > > ] > > } > > }; > > > > > > I then traced this back to the bind_method in Java.pm where the > > __validate_protype mehtod is called. But this is where I am currently > > stuck. I understand the code but following it at this point is tricky. > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > > > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Mon, 18 Sep 2006 18:48:59 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, In ran the following script: ===== use strict ; use JDBC ; JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); warn "driver loaded" ; my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; my $user = 'DAFFODIL'; my $pass = 'daff0d1l'; eval { warn "getting connection" ; my $con = JDBC->getConnection($url, $user, $pass); } ; die $@->getMessage() if $@ ; ===== And got the following output: driver loaded at daff.pl line 6, <GEN18> line 5. getting connection at daff.pl line 13, <GEN18> line 5. java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused at daff.pl line 16, <GEN18> line 9. This is normal since I don't have a Daffodil server running, but what's strange is that it managed to call the getConnection method without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on Linux x86. Can you try my test script and see if you get the same result? Patrick On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > http://www.daffodildb.com/one-dollar-db.html > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Saturday, September 16, 2006 2:24 AM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > I would like to try an reproduce the bug on my station. Can you send > me the Daffodil classes or are they proprietary? If they are, can you > reproduce the bug with another JDBC driver? > > Patrick > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > Cheers > > Joe > > > > -----Original Message----- > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > Sent: Friday, September 15, 2006 1:53 PM > > To: Workman, Joe > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > and re-run your script? > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > From that debug info we should be albe to tell what method is in error, how many > > argument have been passed and how many arguments Inline::Java thinks the method > > has. > > > > Patrick > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > Transaction: Ticket created by josephworkman > > > Queue: Inline-Java > > > Subject: Java Object not properly created > > > Broken in: (no value) > > > Severity: Important > > > Owner: Nobody > > > Requestors: joe.workman@gs.com > > > Status: new > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > First a disclaimer: > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > This may be a bug in Inline::Java but but I thought I would log the > > > bug here since I can not even make a connection to a database via > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > Inline::Java. > > > > > > Environment: > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > perl v5.8.6 > > > Inline::Java v0.51 > > > JDBC v0.01 > > > > > > The Runtime Error: > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > multi/Inline/Java/Object.pm line 107 > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > The Code: > > > use JDBC; > > > sub connect_to_daffodil { > > > $_log->info('Loading driver . . . '); > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > my $user = 'DAFFODIL'; > > > my $pass = 'daff0d1l'; > > > > > > $_log->info('Connecting to daffodil . . . '); > > > my $con = JDBC->getConnection($url, $user, $pass); > > > $_log->info('Successfully connected to daffodil!!'); > > > return $con; > > > } > > > > > > Notes: > > > > > > As you can see, I am just trying to make a basic connection to a > > > Daffodil database via JDBC. The code seem identical to the example in > > > the POD. Maybe there has been a change in Inline::Java that broke > > > JDBC? > > > > > > Dubugging: > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > After looking into Inline::Java::Object the problem is apparently a > > > problem with the $args variable when > > > Inline::Java::Class::CastArguments is called. While digging a little > > > further I see that it has to do with $args and the $protos->key- > > >
> > > >signature in this method do not have the same number of elements
> > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > args:$VAR1 = [ > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > 'DAFFODIL', > > > 'daff0d1l' > > > ]; > > > protos:$VAR1 = { > > > 'java.lang.String' => { > > > 'STATIC' => 1, > > > 'IDX' => 568, > > > 'SIGNATURE' => [ > > > 'java.lang.String' > > > ] > > > }, > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > ' > > > STATIC' => 1, > > > ' > > > IDX' => 569, > > > ' > > > SIGNATURE' => [ > > > > > > 'java.lang.String', > > > > > > 'java.lang.String', > > > > > > 'java.lang.String' > > > > > > ] > > > }, > > > 'java.lang.String, java.util.Properties' => { > > > 'STATIC' => 1, > > > 'IDX' => 567, > > > 'SIGNATURE' => > > > [ > > > > > > 'java.lang.String', > > > > > > 'java.util.Properties' > > > > > > ] > > > } > > > }; > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > __validate_protype mehtod is called. But this is where I am currently > > > stuck. I understand the code but following it at this point is tricky. > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > > > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: RE: [rt.cpan.org #21513] Java Object not properly created
Date: Tue, 19 Sep 2006 18:23:26 +0100
To: <bug-Inline-Java [...] rt.cpan.org>
From: "Workman, Joe" <joe.workman [...] gs.com>
Well your code works . . . From there I did figure out that what was causing my code to bomb was a signal handler. I had this: $SIG{'__DIE__'} = \&death_handler ; Why would this signal handler cause problems? When I comment this line out, everything works great! I really appreciate the help! Is there any way that I can keep my signal handler? I could just localize it inside an eval block. Is that the best way? Cheers Joe Show quoted text
-----Original Message----- From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] Sent: Monday, September 18, 2006 11:49 PM To: Workman, Joe Subject: Re: [rt.cpan.org #21513] Java Object not properly created <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > Joe, In ran the following script: ===== use strict ; use JDBC ; JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); warn "driver loaded" ; my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; my $user = 'DAFFODIL'; my $pass = 'daff0d1l'; eval { warn "getting connection" ; my $con = JDBC->getConnection($url, $user, $pass); } ; die $@->getMessage() if $@ ; ===== And got the following output: driver loaded at daff.pl line 6, <GEN18> line 5. getting connection at daff.pl line 13, <GEN18> line 5. java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused at daff.pl line 16, <GEN18> line 9. This is normal since I don't have a Daffodil server running, but what's strange is that it managed to call the getConnection method without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on Linux x86. Can you try my test script and see if you get the same result? Patrick On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > http://www.daffodildb.com/one-dollar-db.html > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Saturday, September 16, 2006 2:24 AM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > I would like to try an reproduce the bug on my station. Can you send > me the Daffodil classes or are they proprietary? If they are, can you > reproduce the bug with another JDBC driver? > > Patrick > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > Cheers > > Joe > > > > -----Original Message----- > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > Sent: Friday, September 15, 2006 1:53 PM > > To: Workman, Joe > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > and re-run your script? > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > From that debug info we should be albe to tell what method is in error, how many > > argument have been passed and how many arguments Inline::Java thinks the method > > has. > > > > Patrick > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > Transaction: Ticket created by josephworkman > > > Queue: Inline-Java > > > Subject: Java Object not properly created > > > Broken in: (no value) > > > Severity: Important > > > Owner: Nobody > > > Requestors: joe.workman@gs.com > > > Status: new > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > First a disclaimer: > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > This may be a bug in Inline::Java but but I thought I would log the > > > bug here since I can not even make a connection to a database via > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > Inline::Java. > > > > > > Environment: > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > perl v5.8.6 > > > Inline::Java v0.51 > > > JDBC v0.01 > > > > > > The Runtime Error: > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > multi/Inline/Java/Object.pm line 107 > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > The Code: > > > use JDBC; > > > sub connect_to_daffodil { > > > $_log->info('Loading driver . . . '); > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > my $user = 'DAFFODIL'; > > > my $pass = 'daff0d1l'; > > > > > > $_log->info('Connecting to daffodil . . . '); > > > my $con = JDBC->getConnection($url, $user, $pass); > > > $_log->info('Successfully connected to daffodil!!'); > > > return $con; > > > } > > > > > > Notes: > > > > > > As you can see, I am just trying to make a basic connection to a > > > Daffodil database via JDBC. The code seem identical to the example in > > > the POD. Maybe there has been a change in Inline::Java that broke > > > JDBC? > > > > > > Dubugging: > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > After looking into Inline::Java::Object the problem is apparently a > > > problem with the $args variable when > > > Inline::Java::Class::CastArguments is called. While digging a little > > > further I see that it has to do with $args and the $protos->key- > > >
> > > >signature in this method do not have the same number of elements
> > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > args:$VAR1 = [ > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > 'DAFFODIL', > > > 'daff0d1l' > > > ]; > > > protos:$VAR1 = { > > > 'java.lang.String' => { > > > 'STATIC' => 1, > > > 'IDX' => 568, > > > 'SIGNATURE' => [ > > > 'java.lang.String' > > > ] > > > }, > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > ' > > > STATIC' => 1, > > > ' > > > IDX' => 569, > > > ' > > > SIGNATURE' => [ > > > > > > 'java.lang.String', > > > > > > 'java.lang.String', > > > > > > 'java.lang.String' > > > > > > ] > > > }, > > > 'java.lang.String, java.util.Properties' => { > > > 'STATIC' => 1, > > > 'IDX' => 567, > > > 'SIGNATURE' => > > > [ > > > > > > 'java.lang.String', > > > > > > 'java.util.Properties' > > > > > > ] > > > } > > > }; > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > __validate_protype mehtod is called. But this is where I am currently > > > stuck. I understand the code but following it at this point is tricky. > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > > > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Tue, 19 Sep 2006 13:38:13 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, After the fact I realized that that could be the problem. Inside the Inline::Java code there are quite a few calls that are eval'ed: eval { }; if ($@){ # ... } Unfortunately, these exceptions will trigger $SIG{'__DIE__'} handlers (even if they are caught). I suppose Inline::Java could localize $SIG{'__DIE__'} all over the place to protect against this, I'll ask around and see what the best practice is. Cheers, Patrick On 9/19/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Well your code works . . . From there I did figure out that what was causing my code to bomb was a signal handler. I had this: > > $SIG{'__DIE__'} = \&death_handler ; > > Why would this signal handler cause problems? When I comment this line out, everything works great! I really appreciate the help! Is there any way that I can keep my signal handler? I could just localize it inside an eval block. Is that the best way? > > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Monday, September 18, 2006 11:49 PM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > In ran the following script: > > ===== > use strict ; > > use JDBC ; > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > warn "driver loaded" ; > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > my $user = 'DAFFODIL'; > my $pass = 'daff0d1l'; > > eval { > warn "getting connection" ; > my $con = JDBC->getConnection($url, $user, $pass); > } ; > die $@->getMessage() if $@ ; > ===== > > And got the following output: > > driver loaded at daff.pl line 6, <GEN18> line 5. > getting connection at daff.pl line 13, <GEN18> line 5. > java.rmi.ConnectException: Connection refused to host: localhost; > nested exception is: > java.net.ConnectException: Connection refused at daff.pl line > 16, <GEN18> line 9. > > This is normal since I don't have a Daffodil server running, but > what's strange is that it managed to call the getConnection method > without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on > Linux x86. > > Can you try my test script and see if you get the same result? > > Patrick > > > On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > > > http://www.daffodildb.com/one-dollar-db.html > > > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > > > Cheers > > Joe > > > > -----Original Message----- > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > Sent: Saturday, September 16, 2006 2:24 AM > > To: Workman, Joe > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > I would like to try an reproduce the bug on my station. Can you send > > me the Daffodil classes or are they proprietary? If they are, can you > > reproduce the bug with another JDBC driver? > > > > Patrick > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Queue: Inline-Java > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > > > Cheers > > > Joe > > > > > > -----Original Message----- > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > Sent: Friday, September 15, 2006 1:53 PM > > > To: Workman, Joe > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Joe, > > > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > > and re-run your script? > > > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > > From that debug info we should be albe to tell what method is in error, how many > > > argument have been passed and how many arguments Inline::Java thinks the method > > > has. > > > > > > Patrick > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > > Transaction: Ticket created by josephworkman > > > > Queue: Inline-Java > > > > Subject: Java Object not properly created > > > > Broken in: (no value) > > > > Severity: Important > > > > Owner: Nobody > > > > Requestors: joe.workman@gs.com > > > > Status: new > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > > > First a disclaimer: > > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > > This may be a bug in Inline::Java but but I thought I would log the > > > > bug here since I can not even make a connection to a database via > > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > > Inline::Java. > > > > > > > > Environment: > > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > > perl v5.8.6 > > > > Inline::Java v0.51 > > > > JDBC v0.01 > > > > > > > > The Runtime Error: > > > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > > multi/Inline/Java/Object.pm line 107 > > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > > > The Code: > > > > use JDBC; > > > > sub connect_to_daffodil { > > > > $_log->info('Loading driver . . . '); > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > > my $user = 'DAFFODIL'; > > > > my $pass = 'daff0d1l'; > > > > > > > > $_log->info('Connecting to daffodil . . . '); > > > > my $con = JDBC->getConnection($url, $user, $pass); > > > > $_log->info('Successfully connected to daffodil!!'); > > > > return $con; > > > > } > > > > > > > > Notes: > > > > > > > > As you can see, I am just trying to make a basic connection to a > > > > Daffodil database via JDBC. The code seem identical to the example in > > > > the POD. Maybe there has been a change in Inline::Java that broke > > > > JDBC? > > > > > > > > Dubugging: > > > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > > After looking into Inline::Java::Object the problem is apparently a > > > > problem with the $args variable when > > > > Inline::Java::Class::CastArguments is called. While digging a little > > > > further I see that it has to do with $args and the $protos->key- > > > >
> > > > >signature in this method do not have the same number of elements
> > > > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > > > args:$VAR1 = [ > > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > > 'DAFFODIL', > > > > 'daff0d1l' > > > > ]; > > > > protos:$VAR1 = { > > > > 'java.lang.String' => { > > > > 'STATIC' => 1, > > > > 'IDX' => 568, > > > > 'SIGNATURE' => [ > > > > 'java.lang.String' > > > > ] > > > > }, > > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > > ' > > > > STATIC' => 1, > > > > ' > > > > IDX' => 569, > > > > ' > > > > SIGNATURE' => [ > > > > > > > > 'java.lang.String', > > > > > > > > 'java.lang.String', > > > > > > > > 'java.lang.String' > > > > > > > > ] > > > > }, > > > > 'java.lang.String, java.util.Properties' => { > > > > 'STATIC' => 1, > > > > 'IDX' => 567, > > > > 'SIGNATURE' => > > > > [ > > > > > > > > 'java.lang.String', > > > > > > > > 'java.util.Properties' > > > > > > > > ] > > > > } > > > > }; > > > > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > > __validate_protype mehtod is called. But this is where I am currently > > > > stuck. I understand the code but following it at this point is tricky. > > > >
> > > > > > > > > -- > > > ===================== > > > Patrick LeBoutillier > > > Laval, Québec, Canada > > > > > > > > > > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Tue, 19 Sep 2006 16:45:05 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, Placing this at the beginning of you're handler apparently will solve your problem: die $@ if $^S; Patrick On 9/19/06, Patrick LeBoutillier via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > After the fact I realized that that could be the problem. Inside the > Inline::Java code there > are quite a few calls that are eval'ed: > > eval { > }; > if ($@){ > # ... > } > > Unfortunately, these exceptions will trigger $SIG{'__DIE__'} handlers > (even if they are caught). I suppose Inline::Java could localize > $SIG{'__DIE__'} all over the place to protect against this, I'll ask > around and see what the best practice is. > > > Cheers, > > Patrick > > > On 9/19/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Well your code works . . . From there I did figure out that what was causing my code to bomb was a signal handler. I had this: > > > > $SIG{'__DIE__'} = \&death_handler ; > > > > Why would this signal handler cause problems? When I comment this line out, everything works great! I really appreciate the help! Is there any way that I can keep my signal handler? I could just localize it inside an eval block. Is that the best way? > > > > Cheers > > Joe > > > > -----Original Message----- > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > Sent: Monday, September 18, 2006 11:49 PM > > To: Workman, Joe > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > In ran the following script: > > > > ===== > > use strict ; > > > > use JDBC ; > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > warn "driver loaded" ; > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > my $user = 'DAFFODIL'; > > my $pass = 'daff0d1l'; > > > > eval { > > warn "getting connection" ; > > my $con = JDBC->getConnection($url, $user, $pass); > > } ; > > die $@->getMessage() if $@ ; > > ===== > > > > And got the following output: > > > > driver loaded at daff.pl line 6, <GEN18> line 5. > > getting connection at daff.pl line 13, <GEN18> line 5. > > java.rmi.ConnectException: Connection refused to host: localhost; > > nested exception is: > > java.net.ConnectException: Connection refused at daff.pl line > > 16, <GEN18> line 9. > > > > This is normal since I don't have a Daffodil server running, but > > what's strange is that it managed to call the getConnection method > > without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on > > Linux x86. > > > > Can you try my test script and see if you get the same result? > > > > Patrick > > > > > > On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Queue: Inline-Java > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > > > > > http://www.daffodildb.com/one-dollar-db.html > > > > > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > > > > > Cheers > > > Joe > > > > > > -----Original Message----- > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > Sent: Saturday, September 16, 2006 2:24 AM > > > To: Workman, Joe > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Joe, > > > > > > I would like to try an reproduce the bug on my station. Can you send > > > me the Daffodil classes or are they proprietary? If they are, can you > > > reproduce the bug with another JDBC driver? > > > > > > Patrick > > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > Queue: Inline-Java > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > > > > > Cheers > > > > Joe > > > > > > > > -----Original Message----- > > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > > Sent: Friday, September 15, 2006 1:53 PM > > > > To: Workman, Joe > > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > Joe, > > > > > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > > > and re-run your script? > > > > > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > > > From that debug info we should be albe to tell what method is in error, how many > > > > argument have been passed and how many arguments Inline::Java thinks the method > > > > has. > > > > > > > > Patrick > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > > > Transaction: Ticket created by josephworkman > > > > > Queue: Inline-Java > > > > > Subject: Java Object not properly created > > > > > Broken in: (no value) > > > > > Severity: Important > > > > > Owner: Nobody > > > > > Requestors: joe.workman@gs.com > > > > > Status: new > > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > > > > > > First a disclaimer: > > > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > > > This may be a bug in Inline::Java but but I thought I would log the > > > > > bug here since I can not even make a connection to a database via > > > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > > > Inline::Java. > > > > > > > > > > Environment: > > > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > > > perl v5.8.6 > > > > > Inline::Java v0.51 > > > > > JDBC v0.01 > > > > > > > > > > The Runtime Error: > > > > > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > > > multi/Inline/Java/Object.pm line 107 > > > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > > > > > The Code: > > > > > use JDBC; > > > > > sub connect_to_daffodil { > > > > > $_log->info('Loading driver . . . '); > > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > > > my $user = 'DAFFODIL'; > > > > > my $pass = 'daff0d1l'; > > > > > > > > > > $_log->info('Connecting to daffodil . . . '); > > > > > my $con = JDBC->getConnection($url, $user, $pass); > > > > > $_log->info('Successfully connected to daffodil!!'); > > > > > return $con; > > > > > } > > > > > > > > > > Notes: > > > > > > > > > > As you can see, I am just trying to make a basic connection to a > > > > > Daffodil database via JDBC. The code seem identical to the example in > > > > > the POD. Maybe there has been a change in Inline::Java that broke > > > > > JDBC? > > > > > > > > > > Dubugging: > > > > > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > > > After looking into Inline::Java::Object the problem is apparently a > > > > > problem with the $args variable when > > > > > Inline::Java::Class::CastArguments is called. While digging a little > > > > > further I see that it has to do with $args and the $protos->key- > > > > >
> > > > > >signature in this method do not have the same number of elements
> > > > > > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > > > > > args:$VAR1 = [ > > > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > > > 'DAFFODIL', > > > > > 'daff0d1l' > > > > > ]; > > > > > protos:$VAR1 = { > > > > > 'java.lang.String' => { > > > > > 'STATIC' => 1, > > > > > 'IDX' => 568, > > > > > 'SIGNATURE' => [ > > > > > 'java.lang.String' > > > > > ] > > > > > }, > > > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > > > ' > > > > > STATIC' => 1, > > > > > ' > > > > > IDX' => 569, > > > > > ' > > > > > SIGNATURE' => [ > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.lang.String' > > > > > > > > > > ] > > > > > }, > > > > > 'java.lang.String, java.util.Properties' => { > > > > > 'STATIC' => 1, > > > > > 'IDX' => 567, > > > > > 'SIGNATURE' => > > > > > [ > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.util.Properties' > > > > > > > > > > ] > > > > > } > > > > > }; > > > > > > > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > > > __validate_protype mehtod is called. But this is where I am currently > > > > > stuck. I understand the code but following it at this point is tricky. > > > > >
> > > > > > > > > > > > -- > > > > ===================== > > > > Patrick LeBoutillier > > > > Laval, Québec, Canada > > > > > > > > > > > > > > > >
> > > > > > > > > -- > > > ===================== > > > Patrick LeBoutillier > > > Laval, Québec, Canada > > > > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Subject: RE: [rt.cpan.org #21513] Java Object not properly created
Date: Wed, 20 Sep 2006 11:29:36 +0100
To: <bug-Inline-Java [...] rt.cpan.org>
From: "Workman, Joe" <joe.workman [...] gs.com>
Very cool! Thank you soo much for all you help. I am very impressed with the level of support you gave me. Cheers Joe Show quoted text
-----Original Message----- From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] Sent: Tuesday, September 19, 2006 9:45 PM To: Workman, Joe Subject: Re: [rt.cpan.org #21513] Java Object not properly created <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > Joe, Placing this at the beginning of you're handler apparently will solve your problem: die $@ if $^S; Patrick On 9/19/06, Patrick LeBoutillier via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > After the fact I realized that that could be the problem. Inside the > Inline::Java code there > are quite a few calls that are eval'ed: > > eval { > }; > if ($@){ > # ... > } > > Unfortunately, these exceptions will trigger $SIG{'__DIE__'} handlers > (even if they are caught). I suppose Inline::Java could localize > $SIG{'__DIE__'} all over the place to protect against this, I'll ask > around and see what the best practice is. > > > Cheers, > > Patrick > > > On 9/19/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Well your code works . . . From there I did figure out that what was causing my code to bomb was a signal handler. I had this: > > > > $SIG{'__DIE__'} = \&death_handler ; > > > > Why would this signal handler cause problems? When I comment this line out, everything works great! I really appreciate the help! Is there any way that I can keep my signal handler? I could just localize it inside an eval block. Is that the best way? > > > > Cheers > > Joe > > > > -----Original Message----- > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > Sent: Monday, September 18, 2006 11:49 PM > > To: Workman, Joe > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > In ran the following script: > > > > ===== > > use strict ; > > > > use JDBC ; > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > warn "driver loaded" ; > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > my $user = 'DAFFODIL'; > > my $pass = 'daff0d1l'; > > > > eval { > > warn "getting connection" ; > > my $con = JDBC->getConnection($url, $user, $pass); > > } ; > > die $@->getMessage() if $@ ; > > ===== > > > > And got the following output: > > > > driver loaded at daff.pl line 6, <GEN18> line 5. > > getting connection at daff.pl line 13, <GEN18> line 5. > > java.rmi.ConnectException: Connection refused to host: localhost; > > nested exception is: > > java.net.ConnectException: Connection refused at daff.pl line > > 16, <GEN18> line 9. > > > > This is normal since I don't have a Daffodil server running, but > > what's strange is that it managed to call the getConnection method > > without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on > > Linux x86. > > > > Can you try my test script and see if you get the same result? > > > > Patrick > > > > > > On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Queue: Inline-Java > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > > > > > http://www.daffodildb.com/one-dollar-db.html > > > > > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > > > > > Cheers > > > Joe > > > > > > -----Original Message----- > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > Sent: Saturday, September 16, 2006 2:24 AM > > > To: Workman, Joe > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Joe, > > > > > > I would like to try an reproduce the bug on my station. Can you send > > > me the Daffodil classes or are they proprietary? If they are, can you > > > reproduce the bug with another JDBC driver? > > > > > > Patrick > > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > Queue: Inline-Java > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > > > > > Cheers > > > > Joe > > > > > > > > -----Original Message----- > > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > > Sent: Friday, September 15, 2006 1:53 PM > > > > To: Workman, Joe > > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > Joe, > > > > > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > > > and re-run your script? > > > > > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > > > From that debug info we should be albe to tell what method is in error, how many > > > > argument have been passed and how many arguments Inline::Java thinks the method > > > > has. > > > > > > > > Patrick > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > > > Transaction: Ticket created by josephworkman > > > > > Queue: Inline-Java > > > > > Subject: Java Object not properly created > > > > > Broken in: (no value) > > > > > Severity: Important > > > > > Owner: Nobody > > > > > Requestors: joe.workman@gs.com > > > > > Status: new > > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > > > > > > First a disclaimer: > > > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > > > This may be a bug in Inline::Java but but I thought I would log the > > > > > bug here since I can not even make a connection to a database via > > > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > > > Inline::Java. > > > > > > > > > > Environment: > > > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > > > perl v5.8.6 > > > > > Inline::Java v0.51 > > > > > JDBC v0.01 > > > > > > > > > > The Runtime Error: > > > > > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > > > multi/Inline/Java/Object.pm line 107 > > > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > > > > > The Code: > > > > > use JDBC; > > > > > sub connect_to_daffodil { > > > > > $_log->info('Loading driver . . . '); > > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > > > my $user = 'DAFFODIL'; > > > > > my $pass = 'daff0d1l'; > > > > > > > > > > $_log->info('Connecting to daffodil . . . '); > > > > > my $con = JDBC->getConnection($url, $user, $pass); > > > > > $_log->info('Successfully connected to daffodil!!'); > > > > > return $con; > > > > > } > > > > > > > > > > Notes: > > > > > > > > > > As you can see, I am just trying to make a basic connection to a > > > > > Daffodil database via JDBC. The code seem identical to the example in > > > > > the POD. Maybe there has been a change in Inline::Java that broke > > > > > JDBC? > > > > > > > > > > Dubugging: > > > > > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > > > After looking into Inline::Java::Object the problem is apparently a > > > > > problem with the $args variable when > > > > > Inline::Java::Class::CastArguments is called. While digging a little > > > > > further I see that it has to do with $args and the $protos->key- > > > > >
> > > > > >signature in this method do not have the same number of elements
> > > > > > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > > > > > args:$VAR1 = [ > > > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > > > 'DAFFODIL', > > > > > 'daff0d1l' > > > > > ]; > > > > > protos:$VAR1 = { > > > > > 'java.lang.String' => { > > > > > 'STATIC' => 1, > > > > > 'IDX' => 568, > > > > > 'SIGNATURE' => [ > > > > > 'java.lang.String' > > > > > ] > > > > > }, > > > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > > > ' > > > > > STATIC' => 1, > > > > > ' > > > > > IDX' => 569, > > > > > ' > > > > > SIGNATURE' => [ > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.lang.String' > > > > > > > > > > ] > > > > > }, > > > > > 'java.lang.String, java.util.Properties' => { > > > > > 'STATIC' => 1, > > > > > 'IDX' => 567, > > > > > 'SIGNATURE' => > > > > > [ > > > > > > > > > > 'java.lang.String', > > > > > > > > > > 'java.util.Properties' > > > > > > > > > > ] > > > > > } > > > > > }; > > > > > > > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > > > __validate_protype mehtod is called. But this is where I am currently > > > > > stuck. I understand the code but following it at this point is tricky. > > > > >
> > > > > > > > > > > > -- > > > > ===================== > > > > Patrick LeBoutillier > > > > Laval, Québec, Canada > > > > > > > > > > > > > > > >
> > > > > > > > > -- > > > ===================== > > > Patrick LeBoutillier > > > Laval, Québec, Canada > > > > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Issue resolved. Problem with $SIG{__DIE__} not specifically related to Inline::Java.
Subject: Re: [rt.cpan.org #21513] Java Object not properly created
Date: Wed, 20 Sep 2006 09:08:23 -0400
To: bug-Inline-Java [...] rt.cpan.org
From: "Patrick LeBoutillier" <patrick.leboutillier [...] gmail.com>
Joe, On 9/20/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote: Show quoted text
> > Queue: Inline-Java > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Very cool! Thank you soo much for all you help. I am very impressed with the level of support you gave me.
You're welcome. When the user is cooperative and respectful (unfortunately that is not always the case) it is easier to find some time to help them out. Cheers, Patrick Show quoted text
> > Cheers > Joe > > -----Original Message----- > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > Sent: Tuesday, September 19, 2006 9:45 PM > To: Workman, Joe > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > Joe, > > Placing this at the beginning of you're handler apparently > will solve your problem: > > die $@ if $^S; > > Patrick > > > > On 9/19/06, Patrick LeBoutillier via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > Queue: Inline-Java > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > Joe, > > > > After the fact I realized that that could be the problem. Inside the > > Inline::Java code there > > are quite a few calls that are eval'ed: > > > > eval { > > }; > > if ($@){ > > # ... > > } > > > > Unfortunately, these exceptions will trigger $SIG{'__DIE__'} handlers > > (even if they are caught). I suppose Inline::Java could localize > > $SIG{'__DIE__'} all over the place to protect against this, I'll ask > > around and see what the best practice is. > > > > > > Cheers, > > > > Patrick > > > > > > On 9/19/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > Queue: Inline-Java > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Well your code works . . . From there I did figure out that what was causing my code to bomb was a signal handler. I had this: > > > > > > $SIG{'__DIE__'} = \&death_handler ; > > > > > > Why would this signal handler cause problems? When I comment this line out, everything works great! I really appreciate the help! Is there any way that I can keep my signal handler? I could just localize it inside an eval block. Is that the best way? > > > > > > Cheers > > > Joe > > > > > > -----Original Message----- > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > Sent: Monday, September 18, 2006 11:49 PM > > > To: Workman, Joe > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > Joe, > > > > > > In ran the following script: > > > > > > ===== > > > use strict ; > > > > > > use JDBC ; > > > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > warn "driver loaded" ; > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > my $user = 'DAFFODIL'; > > > my $pass = 'daff0d1l'; > > > > > > eval { > > > warn "getting connection" ; > > > my $con = JDBC->getConnection($url, $user, $pass); > > > } ; > > > die $@->getMessage() if $@ ; > > > ===== > > > > > > And got the following output: > > > > > > driver loaded at daff.pl line 6, <GEN18> line 5. > > > getting connection at daff.pl line 13, <GEN18> line 5. > > > java.rmi.ConnectException: Connection refused to host: localhost; > > > nested exception is: > > > java.net.ConnectException: Connection refused at daff.pl line > > > 16, <GEN18> line 9. > > > > > > This is normal since I don't have a Daffodil server running, but > > > what's strange is that it managed to call the getConnection method > > > without problems. I'm running Inline::Java 0.51 with perl 5.8.5 on > > > Linux x86. > > > > > > Can you try my test script and see if you get the same result? > > > > > > Patrick > > > > > > > > > On 9/18/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > Queue: Inline-Java > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > We are using the Open-source daffodil db called One$DB. You can download a version from here: > > > > > > > > http://www.daffodildb.com/one-dollar-db.html > > > > > > > > I have a the jar file if you would like me to email it to you but I figured it may be easier if you just download a full copy for yourself. > > > > > > > > Cheers > > > > Joe > > > > > > > > -----Original Message----- > > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > > Sent: Saturday, September 16, 2006 2:24 AM > > > > To: Workman, Joe > > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > Joe, > > > > > > > > I would like to try an reproduce the bug on my station. Can you send > > > > me the Daffodil classes or are they proprietary? If they are, can you > > > > reproduce the bug with another JDBC driver? > > > > > > > > Patrick > > > > > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > > > Queue: Inline-Java > > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > Thanks for they speedy response. I really appreciate it! Here is the output from the debug. > > > > > > > > > > Cheers > > > > > Joe > > > > > > > > > > -----Original Message----- > > > > > From: Patrick LeBoutillier via RT [mailto:bug-Inline-Java@rt.cpan.org] > > > > > Sent: Friday, September 15, 2006 1:53 PM > > > > > To: Workman, Joe > > > > > Subject: Re: [rt.cpan.org #21513] Java Object not properly created > > > > > > > > > > > > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > Joe, > > > > > > > > > > Can you set the PERL_INLINE_JAVA_DEBUG environment variable to "5" > > > > > and re-run your script? > > > > > > > > > > You should get a LOT of debugging info about what Inline::Java is trying to do. > > > > > From that debug info we should be albe to tell what method is in error, how many > > > > > argument have been passed and how many arguments Inline::Java thinks the method > > > > > has. > > > > > > > > > > Patrick > > > > > > > > > > On 9/15/06, Joe Workman via RT <bug-Inline-Java@rt.cpan.org> wrote:
> > > > > > > > > > > > Fri Sep 15 08:15:47 2006: Request 21513 was acted upon. > > > > > > Transaction: Ticket created by josephworkman > > > > > > Queue: Inline-Java > > > > > > Subject: Java Object not properly created > > > > > > Broken in: (no value) > > > > > > Severity: Important > > > > > > Owner: Nobody > > > > > > Requestors: joe.workman@gs.com > > > > > > Status: new > > > > > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21513 > > > > > > > > > > > > > > > > > > > First a disclaimer: > > > > > > I am new to Inline::Java and the JDBC module, and do not know Java. > > > > > > This may be a bug in Inline::Java but but I thought I would log the > > > > > > bug here since I can not even make a connection to a database via > > > > > > JDBC. I will also log the bug in JDBC but I think its a issue with > > > > > > Inline::Java. > > > > > > > > > > > > Environment: > > > > > > Solaris 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > > > > > > perl v5.8.6 > > > > > > Inline::Java v0.51 > > > > > > JDBC v0.01 > > > > > > > > > > > > The Runtime Error: > > > > > > > > > > > > 09-15-2006 11:04:44 INFO: Started : ovaa_alarmdef_exception > > > > > > 09-15-2006 11:04:44 INFO: Version : 1.0 > > > > > > 09-15-2006 11:04:44 INFO: Pid : 2825 > > > > > > 09-15-2006 11:04:44 INFO: Loglevel : 4 > > > > > > 09-15-2006 11:04:44 INFO: Cmd Line : > > > > > > 09-15-2006 11:04:44 INFO: Loading driver . . . > > > > > > 09-15-2006 11:04:44 INFO: Successfully loaded daffodil driver!! > > > > > > 09-15-2006 11:04:44 INFO: Connecting to daffodil . . . > > > > > > 09-15-2006 11:04:44 FATAL: Wrong number of arguments at /opt/gsperl- > > > > > > 5.8.6_1/lib/site_perl/5.8.6/sun4-solaris-thread- > > > > > > multi/Inline/Java/Object.pm line 107 > > > > > > 09-15-2006 11:04:44 FATAL: Processing aborted! > > > > > > > > > > > > The Code: > > > > > > use JDBC; > > > > > > sub connect_to_daffodil { > > > > > > $_log->info('Loading driver . . . '); > > > > > > JDBC->load_driver('in.co.daffodil.db.rmi.RmiDaffodilDBDriver'); > > > > > > $_log->info('Successfully loaded daffodil driver!!'); > > > > > > > > > > > > my $url = 'jdbc:daffodilDB://localhost:3456/ovaa'; > > > > > > my $user = 'DAFFODIL'; > > > > > > my $pass = 'daff0d1l'; > > > > > > > > > > > > $_log->info('Connecting to daffodil . . . '); > > > > > > my $con = JDBC->getConnection($url, $user, $pass); > > > > > > $_log->info('Successfully connected to daffodil!!'); > > > > > > return $con; > > > > > > } > > > > > > > > > > > > Notes: > > > > > > > > > > > > As you can see, I am just trying to make a basic connection to a > > > > > > Daffodil database via JDBC. The code seem identical to the example in > > > > > > the POD. Maybe there has been a change in Inline::Java that broke > > > > > > JDBC? > > > > > > > > > > > > Dubugging: > > > > > > > > > > > > I hope that soem of thsi debugging may help in find the solution. > > > > > > After looking into Inline::Java::Object the problem is apparently a > > > > > > problem with the $args variable when > > > > > > Inline::Java::Class::CastArguments is called. While digging a little > > > > > > further I see that it has to do with $args and the $protos->key- > > > > > >
> > > > > > >signature in this method do not have the same number of elements
> > > > > > > > > > > > (args has 3 was the signature of the first proto only has 1). > > > > > > > > > > > > args:$VAR1 = [ > > > > > > 'jdbc:daffodilDB://localhost:3456/ovaa', > > > > > > 'DAFFODIL', > > > > > > 'daff0d1l' > > > > > > ]; > > > > > > protos:$VAR1 = { > > > > > > 'java.lang.String' => { > > > > > > 'STATIC' => 1, > > > > > > 'IDX' => 568, > > > > > > 'SIGNATURE' => [ > > > > > > 'java.lang.String' > > > > > > ] > > > > > > }, > > > > > > 'java.lang.String, java.lang.String, java.lang.String' => { > > > > > > ' > > > > > > STATIC' => 1, > > > > > > ' > > > > > > IDX' => 569, > > > > > > ' > > > > > > SIGNATURE' => [ > > > > > > > > > > > > 'java.lang.String', > > > > > > > > > > > > 'java.lang.String', > > > > > > > > > > > > 'java.lang.String' > > > > > > > > > > > > ] > > > > > > }, > > > > > > 'java.lang.String, java.util.Properties' => { > > > > > > 'STATIC' => 1, > > > > > > 'IDX' => 567, > > > > > > 'SIGNATURE' => > > > > > > [ > > > > > > > > > > > > 'java.lang.String', > > > > > > > > > > > > 'java.util.Properties' > > > > > > > > > > > > ] > > > > > > } > > > > > > }; > > > > > > > > > > > > > > > > > > I then traced this back to the bind_method in Java.pm where the > > > > > > __validate_protype mehtod is called. But this is where I am currently > > > > > > stuck. I understand the code but following it at this point is tricky. > > > > > >
> > > > > > > > > > > > > > > -- > > > > > ===================== > > > > > Patrick LeBoutillier > > > > > Laval, Québec, Canada > > > > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > -- > > > > ===================== > > > > Patrick LeBoutillier > > > > Laval, Québec, Canada > > > > > > > >
> > > > > > > > > -- > > > ===================== > > > Patrick LeBoutillier > > > Laval, Québec, Canada > > > > > >
> > > > > > -- > > ===================== > > Patrick LeBoutillier > > Laval, Québec, Canada > > > >
> > > -- > ===================== > Patrick LeBoutillier > Laval, Québec, Canada > >
-- ===================== Patrick LeBoutillier Laval, Québec, Canada
Not really an Inline::Java problem. Issue with a global $SIG{__DIE__} handler.