db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Donkersloot <j...@geomaxmobile.com>
Subject Hibernate commit issue
Date Wed, 30 May 2007 19:45:21 GMT
Hi,
I have been having an issue where the database portion of my application 
becomes unusable after a commit fails.  I am using hibernate 3.2.4 and 
derby 10.2.2.  The following exception is thrown.  The database call 
that causes this exception has been called numerous times before during 
the running of this application and occasionally this exception is 
thrown.  The database call is a simple update.

***********************************************************************
org.hibernate.TransactionException: JDBC commit failed
    at 
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:130)
    at com.geomaxmobile.controllers.b.c(Unknown Source)
    at com.geomaxmobile.controllers.b.b(Unknown Source)
    at com.geomaxmobile.imaging.imager.ImagerConnector.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Java exception: ': 
java.lang.NullPointerException'.
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
Source)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
    at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source)
    at 
org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139)
    at 
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115)
    ... 4 more
Caused by: java.sql.SQLException: Java exception: ': 
java.lang.NullPointerException'.
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown 
Source)
    ... 14 more
***********************************************************************

After this exception is thrown hibernate tries to release it's 
connection back to the connection pool and continue on.  However another 
exception is throw for each subsequent call to hibernate (and therefore 
derby).
***********************************************************************
java.sql.SQLTransientConnectionException: No current connection.
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown 
Source)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.EmbedConnection.getTransactionIsolation(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.EmbedConnection.setTransactionIsolation(Unknown 
Source)
    at 
org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:103)
    at 
org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:324)
    at 
org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:118)
    at 
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
    at org.hibernate.loader.Loader.doQuery(Loader.java:661)
    at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.doList(Loader.java:2150)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
    at org.hibernate.loader.Loader.list(Loader.java:2024)
    at 
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1550)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
    at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:431)
    at com.geomaxmobile.controllers.b.f(Unknown Source)
    at com.geomaxmobile.imaging.imager.ImagerConnector.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No current connection.
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
Source)
    at 
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown 
Source)
    ... 24 more
***********************************************************************

Any advice on why / how the initial exception could be cause would be 
appreciated.
Thanks,
    Josh


Mime
View raw message