Issue Details (XML | Word | Printable)

Key: NUCRDBMS-497
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Testcase Required Testcase Required
Assignee: Unassigned
Reporter: Chris Colman
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store RDBMS

App fails during schema validation with HSQL: setTransactionIsolation fails with active transaction

Created: 11/Feb/11 01:14 AM   Updated: 09/Dec/11 03:15 PM   Resolved: 10/Nov/11 09:33 AM
Component/s: ORM
Affects Version/s: 2.2.1
Fix Version/s: None

Environment:
Windows XP
HSQLDB

Datastore: HSQL
Severity: Development


 Description  « Hide
During schema validation the DBCP connection pool attempts to set the transaction isolation level but HSQL throws an exception because it has an active SQL-transaction. Is that a problem for most RDBMSes or just HSQL?

The same code starts up fine with Oracle XE.

Caused by: java.sql.SQLException: invalid transaction state: active SQL-transaction
        at org.hsqldb.jdbc.Util.sqlException(Util.java:380)
        at org.hsqldb.jdbc.Util.sqlException(Util.java:103)
        at org.hsqldb.jdbc.JDBCConnection.setTransactionIsolation(JDBCConnection.java:1402)
        at org.apache.commons.dbcp.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:340)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setTransactionIsolation(PoolingDataSource.java:332)
        at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:399)
        at org.datanucleus.store.rdbms.AbstractSchemaTransaction.getCurrentConnection(AbstractSchemaTransaction
.java:83)
        at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:2616)

Chris Colman added a comment - 11/Feb/11 01:26 AM - edited
I should add: Using the latest HSQL 2.x, not the earlier 1.8 (I've just verified that DN 2.2.1 works fine with the earlier 1.8)

It appears HSQL 2.x introduces some changes in this area:

"Transactions and Concurrency Control

HyperSQL 2.0 has been fully redesigned to support different transaction isolation models. It no longer supports the old 1.8.x model with "dirty read". Although it is perfectly possible to add an implementation of the transaction manager that supports the legacy model, we thought this is no longer necessary. The new system allows you to select the transaction isolation model while the engine is running. It also allows you to choose different isolation levels for different simultaneous sessions."

Andy Jefferson added a comment - 11/Feb/11 03:18 PM
The famous test-case that demonstrates something (that we can't currently see)?

Andy Jefferson made changes - 11/Feb/11 03:18 PM
Field Original Value New Value
Priority Major [ 3 ] Incomplete [ 6 ]
Andy Jefferson added a comment - 10/Nov/11 09:33 AM
Provide a testcase to demonstrate, otherwise nothing can be done.

Andy Jefferson made changes - 10/Nov/11 09:33 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Cannot Reproduce [ 5 ]
Andy Jefferson made changes - 09/Dec/11 03:15 PM
Status Resolved [ 5 ] Closed [ 6 ]