"Not in transaction", but looks like transactions
Posted in 2012
Topics: Error Codes & Troubleshooting, Connectivity: ODBC / JDBC / .NET, Java & JDBC Development
Stumped by an error that Informix is delivering up the stack through Hibernate. I know this is an Informix forum and not a Java forum, but a snippet of the stack trace (edited) will help show why I'm confused: [#|2012-09-24T09:24:21.563-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL Warning: 0, SQLState: 01I01|#] [#|2012-09-24T09:24:21.564-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;| *Database has transactions*|#] [#|2012-09-24T09:24:21.564-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL Warning: 0, SQLState: 01I04|#] [#|2012-09-24T09:24:21.565-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|Database selected|#] [#|2012-09-24T09:24:21.586-0400|SEVERE|glassfish3.1.2|org.hibernate.id.enhanced. TableGenerator|_ThreadID=45;_ThreadName=Thread-2;|could not read or init a hi value java.sql.SQLException: *Not in transaction*. [various Informix driver frames here] at com.informix.jdbc.IfxPreparedStatement.executeQuery(IfxPreparedStatement.java:37 9) at com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40.executeQuery(PreparedStatement Wrapper40.java:642) at org.hibernate.id.enhanced.TableGenerator.doWorkInCurrentTransaction(TableGenerat or.java:473) at org.hibernate.engine.TransactionHelper$1Work.doWork(TransactionHelper.java:61) at org.hibernate.engine.transaction.Isolater$JtaDelegate.doTheWork(Isolater.java:19 4) at org.hibernate.engine.transaction.Isolater$JtaDelegate.* doTheWorkInNewTransaction*(Isolater.java:163) ...and then further on: [#|2012-09-24T09:24:21.588-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL Error: -255, SQLState: IX000|#] So Informix is reporting that transactions are enabled, and Hibernate is calling a method inside itself that performs the work in a new transaction (see the bottom of the stack). Nevertheless we're getting an error that indicates that transactions are not enabled. What troubleshooting steps should I take from here? Best, Laird -- http://about.me/lairdnelson --20cf300faf41cc10aa04ca883068
How did you set the AUTOCOMMIT? Not in transaction would be raised if you try to commit/rollback without being inside a transaction. If you have autocommit it could cause this. Include also the JDBC driver version you're using and if it's not too much work use the last one... There was a bug that could explain this, but if I recall correctly it would only apply to ANSI mode databases... is your database in mode ANSI? Regards. On Tue, Sep 25, 2012 at 4:16 PM, Laird Nelson <ljnelson@gmail.com> wrote: > Stumped by an error that Informix is delivering up the stack through > Hibernate. > > I know this is an Informix forum and not a Java forum, but a snippet of the > stack trace (edited) will help show why I'm confused: > > > > [#|2012-09-24T09:24:21.563-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL > Warning: 0, SQLState: 01I01|#] > > > > [#|2012-09-24T09:24:21.564-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;| > *Database has transactions*|#] > > > > [#|2012-09-24T09:24:21.564-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL > Warning: 0, SQLState: 01I04|#] > > > > [#|2012-09-24T09:24:21.565-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|Database > selected|#] > > > > [#|2012-09-24T09:24:21.586-0400|SEVERE|glassfish3.1.2|org.hibernate.id.enhanced. TableGenerator|_ThreadID=45;_ThreadName=Thread-2;|could > not read or init a hi value > > java.sql.SQLException: *Not in transaction*. > > [various Informix driver frames here] > > at > > > com.informix.jdbc.IfxPreparedStatement.executeQuery(IfxPreparedStatement.java:37 9) > > at > > > com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40.executeQuery(PreparedStatement Wrapper40.java:642) > > at > > > org.hibernate.id.enhanced.TableGenerator.doWorkInCurrentTransaction(TableGenerat or.java:473) > > at > > org.hibernate.engine.TransactionHelper$1Work.doWork(TransactionHelper.java:61) > > at > > > org.hibernate.engine.transaction.Isolater$JtaDelegate.doTheWork(Isolater.java:19 4) > > at org.hibernate.engine.transaction.Isolater$JtaDelegate.* > doTheWorkInNewTransaction*(Isolater.java:163) > > ....and then further on: > > > > [#|2012-09-24T09:24:21.588-0400|WARNING|glassfish3.1.2|org.hibernate.util.JDBCEx ceptionReporter|_ThreadID=45;_ThreadName=Thread-2;|SQL > Error: -255, SQLState: IX000|#] > > So Informix is reporting that transactions are enabled, and Hibernate is > calling a method inside itself that performs the work in a new transaction > (see the bottom of the stack). Nevertheless we're getting an error that > indicates that transactions are not enabled. > > What troubleshooting steps should I take from here? > > Best, > Laird > > -- > http://about.me/lairdnelson > > --20cf300faf41cc10aa04ca883068 > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently... --20cf302efcd632cb6b04ca89b48e