Re: JDBC.pm no longer works with Inline::Java?

[email protected] (Russ Tremain)
Newsgroups perl.inline
Message-ID <p06240825cc6587ed6c52@[204.68.225.24]>
I was able to get past this by reverting to perl 5.8.9 from macports.

I have 2 other machines running leopard (mac osx 10.5.8) that had no trouble, using perl 5.8.8.
However 5.10.0 (default on osx 10.6.8) was a no-go.

The Inline::Java tests pass on either, but JDBC.pm provokes errors, which makes me wonder if the Inline::Java tests have enough coverage.  I don't think that JDBC is doing anything unusual, just loading more classes.

-Russ

At 11:43 PM -0700 8/25/12, Russ Tremain wrote:
>Hi,
>
>I've been trying to install Inline::Java with JDBC for several hours.
>
>I cannot get the JDBC tests to pass.  Here is the error:
>
>tanami{jdbcpm.41} Build test
>t/00-load.t ....... 1/1 # Testing JDBC 0.01, Perl 5.010000, /usr/bin/perl
>t/00-load.t ....... ok
>t/01-driver.t ..... 1/4 Can't locate object method "__validate_prototype" via package "JDBC" at (eval 27) line 344, <GEN6> line 5.
># Looks like you planned 4 tests but ran 1.
># Looks like your test exited with 9 just after 1.
>t/01-driver.t ..... Dubious, test returned 9 (wstat 2304, 0x900)
>Failed 3/4 subtests
>t/02-connect.t .... 1/3 Can't locate object method "__validate_prototype" via package "JDBC" at (eval 27) line 436, <GEN6> line 5.
># Looks like you planned 3 tests but ran 1.
># Looks like your test exited with 9 just after 1.
>t/02-connect.t .... Dubious, test returned 9 (wstat 2304, 0x900)
>Failed 2/3 subtests
>t/02-const.t ...... ok
>t/03-statement.t .. 1/3 Can't locate object method "__validate_prototype" via package "JDBC" at (eval 27) line 436, <GEN7> line 5.
># Looks like you planned 3 tests but ran 1.
># Looks like your test exited with 9 just after 1.
>t/03-statement.t .. Dubious, test returned 9 (wstat 2304, 0x900)
>Failed 2/3 subtests
>t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
>t/pod.t ........... ok
>
>
>I'm on OSX 10.6 running perl 5.10.0.
>
>Never had trouble with this before.  I have tried it with both JDK 1.5 and JDK 1.6 for the java home.
>
>It appears to me that the java.sql classes are not getting initialized correctly during the "study" phase.
>
>Could it be something to do with the later version of Perl?  When I had this working I was using 5.8.x I believe.
>
>I'm not getting past the DriverManager, which is setup in the JDBC preamble:
>
>----------------------------------------------------------------
>package JDBC;
>
>use warnings;
>use strict;
>
>our $VERSION = '0.01';
>
>our @ISA = qw(Exporter java::sql::DriverManager);
>
>{   # the Inline package needs to be use'd in main in order to
>    # get the studied classes to be rooted in main
>    package main;
>    use Inline ( Java => q{ }, AUTOSTUDY => 1 );
>}
>
>use Inline::Java qw(cast caught study_classes);
>
>our @EXPORT_OK = qw(cast caught study_classes);
>...
>----------------------------------------------------------------
>
>
>the test that are failing are attempting to call methods in java.sql.DriverManager.
>
>I assume that __validate_prototype is some internal method kept by Inline::Java ...
>
>Any help appreciated..  I'm trying to revive my sql command line manager that uses this.
>
>thanks!
>-Russ
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.