Tim, I'm following up with Joe on this issue.
Patrick On 9/15/06, Tim Bunce <[EMAIL PROTECTED]> wrote:
Can someone more familiar with Inline::Java help out Joe? Tim. ----- Forwarded message from Joe Workman via RT <[EMAIL PROTECTED]> ----- Subject: [rt.cpan.org #21512] Java Object not properly created From: Joe Workman via RT <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] RT-Ticket: rt.cpan.org #21512 RT-Originator: [EMAIL PROTECTED] Date: Fri, 15 Sep 2006 08:08:50 -0400 To: undisclosed-recipients: ; Fri Sep 15 08:08:48 2006: Request 21512 was acted upon. Transaction: Ticket created by josephworkman Queue: JDBC Subject: Java Object not properly created Broken in: 0.01 Severity: Important Owner: Nobody Requestors: [EMAIL PROTECTED] Status: new Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=21512 > 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 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: 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. ----- End forwarded message -----
-- ===================== Patrick LeBoutillier Laval, Québec, Canada