Subject: | cannot access methods on executed statement using Basis JDBC drivers |
Hi,
I am going to assume that this is a problem with the JDBC driver (the code in question works fine with the MySQL driver), but I thought I'd report it anyway.
The code below produces the following output when trying to invoke methods on the returned statement handle (line 33 is where $rs->next is executed):
mark:~/work/dmweb$ CLASSPATH=/usr/local/jdbc/new/basisjdbc.jar perl t/testjdbc.pl clm clm
connected connection: main::com::opentext::basis::jdbc::BasisConnection=HASH(0x4059ea28)
resultset rs: main::com::opentext::basis::jdbc::RecordResultSet=HASH(0x9232584)
You are not allowed to invoke method next in class com.opentext.basis.jdbc.RecordResultSet: Class InlineJavaUserClassLink can not access a member of class com.opentext.basis.jdbc.AbstractResultSet with modifiers "public synchronized" at (eval 56) line 1601
at t/testjdbc.pl line 33
This isn't a show-stopper for us as we are using a Perl/JDBC bridge to access the database and I was just trying out alternatives.
best regards,
Mark Clements
environment:
perl v5.8.7 built for i486-linux-gnu-thread-multi
JDBC 0.01
com.opentext.basis.jdbc.BasisDriver - Livelink Collections Server JDBC Driver 10.0.0.115
java.version=1.4.2_08
code:
use strict;
use warnings;
use JDBC;
$|=1;
my $DRIVER = "com.opentext.basis.jdbc.BasisDriver";
my $url = q(jdbc:opentext:basis://user_pc:@ijuge1:372/proci10_sfqm);
print JDBC->load_driver($DRIVER);
my @auth = @ARGV;
my $query = "select * from def_action";
my $con;
eval {
$con = JDBC->getConnection( $url, @auth );
warn "connected connection: $con\n";
my $s = $con->createStatement();
my $rs = $s->executeQuery($query);
print "resultset rs: $rs\n";
while ( $rs->next ) {
my $foo = $rs->getInt(1);
print "row: foo=$foo\n";
}
};
if($@){
my $message;
if(ref $@){
$message = $@->getMessage;
}else{
$message = $@;
}
warn $message;
}