Skip Menu |

This queue is for tickets about the JDBC CPAN distribution.

Report information
The Basics
Id: 50307
Status: resolved
Priority: 0/
Queue: JDBC

People
Owner: russtman [...] gmail.com
Requestors: kwilliams [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: 0.02



Subject: Can't locate object method "__validate_prototype" via package "JDBC"
I'm building on OS X Snow Leopard, using Inline::Java 0.52, Java 1.6.0_15 (the system default), and perl 5.10.0 (the system default). I see the following failure: % Build test t/00-load.........ok 1/1# Testing JDBC 0.01, Perl 5.010000, /usr/bin/perl t/00-load.........ok t/01-driver.......Use of uninitialized value in split at t/test_init.pl line 20. Can't locate object method "__validate_prototype" via package "JDBC" at (eval 25) line 344, <GEN8> line 5. t/01-driver.......ok 1/4# Looks like you planned 4 tests but only ran 1. # Looks like your test died just after 1. t/01-driver.......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-4 Failed 3/4 tests, 25.00% okay t/02-connect......Use of uninitialized value in split at t/test_init.pl line 20. Can't locate object method "__validate_prototype" via package "JDBC" at (eval 25) line 436, <GEN8> line 5. t/02-connect......ok 1/3# Looks like you planned 3 tests but only ran 1. # Looks like your test died just after 1. t/02-connect......dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-3 Failed 2/3 tests, 33.33% okay t/02-const........Use of uninitialized value in split at t/test_init.pl line 20. t/02-const........ok t/03-statement....Use of uninitialized value in split at t/test_init.pl line 20. Can't locate object method "__validate_prototype" via package "JDBC" at (eval 25) line 436, <GEN8> line 5. t/03-statement....ok 1/3# Looks like you planned 3 tests but only ran 1. # Looks like your test died just after 1. t/03-statement....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-3 Failed 2/3 tests, 33.33% okay t/pod-coverage....skipped all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage t/pod.............ok Failed Test Stat Wstat Total Fail List of Failed ----------------------------------------------------------------------- -------- t/01-driver.t 255 65280 4 6 2-4 t/02-connect.t 255 65280 3 4 2-3 t/03-statement.t 255 65280 3 4 2-3 1 test skipped. Failed 3/7 test scripts. 7/18 subtests failed. Files=7, Tests=18, 5 wallclock secs ( 6.24 cusr + 0.88 csys = 7.12 CPU) Failed 3/7 test programs. 7/18 subtests failed. When I walk through the debugger in t/01-driver.t, I see that the failure is within JDBC- Show quoted text
>getLoginTimeout. I'm guessing that any class method inherited from Inline::Java::Object
(via java::sql::DriverManager) is broken. -Ken
RT-Send-CC: russt [...] releasetools.org
Via email from Russ Tremain: ---snip--- Been trying to raise you for a couple of years re: JDBC.pm with perl > 5.8.9. See: https://rt.cpan.org/Public/Bug/Display.html?id=50307 Here is a patch that fixes it: diff -c -r1.1 -r1.2 *** JDBC.pm 26 Sep 2013 15:58:16 -0000 1.1 --- JDBC.pm 14 Jan 2014 01:15:12 -0000 1.2 *************** *** 106,111 **** --- 106,118 ---- warn "studying classes\n" if $debug; study_classes(\@classes, 'main'); + #Fix a long-standing bug due to changes in @ISA caching introduced in perl 5.10.0. + #See http://perldoc.perl.org/perl5100delta.html (search for "mro"). + # + #force a reset of the @ISA cache after injecting java.sql.DriverManager, which we inherit from: + @ISA = @ISA; + # Driver => java.sql.Driver, RowSet => javax.sql.RowSet etc my %class_base = map { m/^(.*\.(\w+))$/ or die; ( $2 => $1) } @classes; Thanks go to Patrick for isolating the fix! Regards, Russ Tremain ---snip--- Thanks Russ!
Moved source from svn.org to: https://github.com/russt/pm-JDBC Tests are now passing.
On Sat Feb 22 09:37:30 2014, RUSST wrote: Show quoted text
> Moved source from svn.org to: https://github.com/russt/pm-JDBC > Tests are now passing.
Correction, source was previously hosted here: http://svn.perl.org/modules/dbi2 Converted from svn to git using this dump: http://svn.perl.org/modules-dumps/dbi2.noempty.dump.bz2