You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Stan Bradbury (JIRA)" <ji...@apache.org> on 2007/05/01 22:56:15 UTC

[jira] Closed: (DERBY-2596) JDBC 4 statement.isClosed throws IllegalAccessError when used with EmbeddedXADataSource40

     [ https://issues.apache.org/jira/browse/DERBY-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stan Bradbury closed DERBY-2596.
--------------------------------

    Resolution: Invalid

Problem with the beta build of IBM 6.0 JDK.

> JDBC 4 statement.isClosed throws IllegalAccessError when used with EmbeddedXADataSource40
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-2596
>                 URL: https://issues.apache.org/jira/browse/DERBY-2596
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.2.2.0
>         Environment: JDBC 4
>            Reporter: Stan Bradbury
>
> he JDBC 4.0 API statement.isClosed works fine when connection 
> pool data source is used, but fails with 
> java.lang.IllegalAccessError when XA data source is used.
> Here is the output of a short test case that demonstrates the 
> bug,
> C:\tests>java TestDerby40IsClosed
> Database product: Apache Derby
> Database version: 10.2.2.0 - (485682)
> Driver name:      Apache Derby Embedded JDBC Driver
> Driver version:   10.2.2.0 - (485682)
> JDBC driver major version: 4
> JDBC driver minor version: 0
> org.apache.derby.impl.jdbc.EmbedStatement40
> stmt.isClosed? false
> Database product: Apache Derby
> Database version: 10.2.2.0 - (485682)
> Driver name:      Apache Derby Embedded JDBC Driver
> Driver version:   10.2.2.0 - (485682)
> JDBC driver major version: 4
> JDBC driver minor version: 0
> org.apache.derby.iapi.jdbc.BrokeredStatement40
> Exception in thread "main" java.lang.IllegalAccessError
>         at 
> TestDerby40IsClosed.main(TestDerby40IsClosed.java:68)
> Here is the test program,
> import java.io.*;
> import java.sql.*;
> import javax.sql.*;
> import javax.transaction.xa.*;
> public class TestDerby40IsClosed
> {
>     public static void main(String[] args) throws Throwable
>     {
>         
> org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40 ds =
>             new 
> org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40();
>         
> ds.setDatabaseName("C:\\drivers\\derby\\databases\\JDBC40DB");
>         ds.setUser("dbuser1");
>         ds.setPassword("dbpwd1");
>         PooledConnection pooledConn = 
> ds.getPooledConnection();
>         Connection conn = pooledConn.getConnection();
>         System.out.println("Database product: " + 
> conn.getMetaData().getDatabaseProductName());
>         System.out.println("Database version: " + 
> conn.getMetaData().getDatabaseProductVersion());
>         System.out.println("Driver name:      " + 
> conn.getMetaData().getDriverName());
>         System.out.println("Driver version:   " + 
> conn.getMetaData().getDriverVersion());
>         System.out.println("JDBC driver major version: " + 
> conn.getMetaData().getJDBCMajorVersion());
>         System.out.println("JDBC driver minor version: " + 
> conn.getMetaData().getJDBCMinorVersion());
>         Statement stmt = conn.createStatement();
>         System.out.println(stmt.getClass().getName());
>         boolean b;
>         b = stmt.isClosed();
>         System.out.println("stmt.isClosed? " + b);
>         stmt.close();
>         stmt = null;
>         conn.close();
>         conn = null;
>         pooledConn.close();
>         pooledConn = null;
>         System.out.println();
>         org.apache.derby.jdbc.EmbeddedXADataSource40 dsxa =
>             new 
> org.apache.derby.jdbc.EmbeddedXADataSource40();
>         
> dsxa.setDatabaseName("C:\\drivers\\derby\\databases\\JDBC40DB");
>         dsxa.setUser("dbuser1");
>         dsxa.setPassword("dbpwd1");
>         XAConnection xaConn = dsxa.getXAConnection();
>         conn = xaConn.getConnection();
>         System.out.println("Database product: " + 
> conn.getMetaData().getDatabaseProductName());
>         System.out.println("Database version: " + 
> conn.getMetaData().getDatabaseProductVersion());
>         System.out.println("Driver name:      " + 
> conn.getMetaData().getDriverName());
>         System.out.println("Driver version:   " + 
> conn.getMetaData().getDriverVersion());
>         System.out.println("JDBC driver major version: " + 
> conn.getMetaData().getJDBCMajorVersion());
>         System.out.println("JDBC driver minor version: " + 
> conn.getMetaData().getJDBCMinorVersion());
>         stmt = conn.createStatement();
>         System.out.println(stmt.getClass().getName());
>         b = stmt.isClosed();
>         System.out.println("stmt.isClosed? " + b);
>         stmt.close();
>         conn.close();
>         xaConn.close();
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.