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/04/26 23:58:15 UTC
[jira] Created: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
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.1
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.
[jira] Commented: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492129 ]
Knut Anders Hatlen commented on DERBY-2596:
-------------------------------------------
FWIW, I don't see this error in my environment.
kah@ugle:/tmp % 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
stmt.isClosed? false
> 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.1
> 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.
[jira] Commented: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492170 ]
Dag H. Wanvik commented on DERBY-2596:
--------------------------------------
I did not see this error, either (10.2.2.0 - 485682, sane jars), Solaris 10/x86, Sun JDK 1.6
I also ran fine on trunk.
I modified the repro by adding ds.setCreateDatabase("create") and changed
the database name to plain "JDBC40DB" (orig was WIndows path).
> 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.
[jira] Closed: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
Posted by "Stan Bradbury (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel John Debrunner updated DERBY-2596:
-----------------------------------------
Affects Version/s: (was: 10.2.2.1)
10.2.2.0
Repro indicates 10.2.2.0, not 10.2.1.0
> 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.
[jira] Commented: (DERBY-2596) JDBC 4 statement.isClosed throws
IllegalAccessError when used with EmbeddedXADataSource40
Posted by "Stan Bradbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492944 ]
Stan Bradbury commented on DERBY-2596:
--------------------------------------
Mea culpa, my apologies - I failed to validate that the failing test was run in a reference environment. A beta version of JDK 6 was being used. Thank you Dag and Knut for looking this, sorry for the distraction.
Am closing this.
> 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.