Transaction problems with Postgresql

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Transaction problems with Postgresql

testforvln
Hi all,

I'm configuring ODE engine with bitronix and postgresql. After following the instructions from here:
http://sathwikbp.blogspot.de/2013/09/apache-ode-on-tomcat-7-with-bitronix.html.
I started the ode engine successfully. But when I deployed process definitions in the /WEB-INF/processes folder, there came the exception:

17:32:05,155 ERROR [ProcessStoreImpl] Error persisting deployment record for {http://sample.bpel.org/bpel/sample}longFlow-1; process will not be available after restart!
<openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:230)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:371)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
    at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
    at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    at org.apache.openjpa.lib.rop.WindowResultList.<init>(WindowResultList.java:57)
    at org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:235)
    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
    at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:255)
    at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:294)
    at org.apache.ode.store.jpa.ConfStoreConnectionJpa.setVersion(ConfStoreConnectionJpa.java:76)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:294)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:793)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 27 more
17:32:05,163 ERROR [ProcessStoreImpl] DbError
java.lang.RuntimeException: java.lang.IllegalStateException: no transaction started on this thread
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:96)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:800)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: no transaction started on this thread
    at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:150)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:94)
    ... 6 more
17:32:05,163 ERROR [DeploymentPoller] Deployment of LongFlow failed, aborting for now.
org.apache.ode.bpel.iapi.ContextException: DbError
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:618)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:172)
    at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.java:160)
    at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPoller.java:60)
    at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(DeploymentPoller.java:251)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:616)
    ... 5 more
Caused by: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:87)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:794)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241)
    at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:85)
    ... 6 more
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.retainConnection(JDBCStoreManager.java:216)
    at org.apache.openjpa.kernel.DelegatingStoreManager.retainConnection(DelegatingStoreManager.java:163)
    at org.apache.openjpa.kernel.BrokerImpl.retainConnection(BrokerImpl.java:3710)
    at org.apache.openjpa.kernel.BrokerImpl.beginStoreManagerTransaction(BrokerImpl.java:1283)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1968)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
    at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532)
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235)
    ... 8 more
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 17 more

I'm confused with the exception. Has anyone met this kind of problem?
Regards,
Vito


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Transaction problems with Postgresql

Brett Wooldridge-2
OpenJPA is trying to set a transaction isolation level that is different than the default being set on connections in the pool ... and is apparently doing it once a transaction has already started.  One thing to try is to make sure the default configured isolation level for OpenJPA matches the one you've configured on the Driver/DataSource in BTM.

You can see this in the stack trace:

Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
...
org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(...)



On Mon, Mar 24, 2014 at 5:20 PM, Vito <[hidden email]> wrote:
Hi all,

I'm configuring ODE engine with bitronix and postgresql. After following the instructions from here:
http://sathwikbp.blogspot.de/2013/09/apache-ode-on-tomcat-7-with-bitronix.html.
I started the ode engine successfully. But when I deployed process definitions in the /WEB-INF/processes folder, there came the exception:

17:32:05,155 ERROR [ProcessStoreImpl] Error persisting deployment record for {http://sample.bpel.org/bpel/sample}longFlow-1; process will not be available after restart!
<openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:230)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:371)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
    at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
    at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    at org.apache.openjpa.lib.rop.WindowResultList.<init>(WindowResultList.java:57)
    at org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:235)
    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
    at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:255)
    at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:294)
    at org.apache.ode.store.jpa.ConfStoreConnectionJpa.setVersion(ConfStoreConnectionJpa.java:76)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:294)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:793)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 27 more
17:32:05,163 ERROR [ProcessStoreImpl] DbError
java.lang.RuntimeException: java.lang.IllegalStateException: no transaction started on this thread
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:96)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:800)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: no transaction started on this thread
    at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:150)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:94)
    ... 6 more
17:32:05,163 ERROR [DeploymentPoller] Deployment of LongFlow failed, aborting for now.
org.apache.ode.bpel.iapi.ContextException: DbError
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:618)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:172)
    at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.java:160)
    at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPoller.java:60)
    at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(DeploymentPoller.java:251)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:616)
    ... 5 more
Caused by: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:87)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:794)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241)
    at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:85)
    ... 6 more
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.retainConnection(JDBCStoreManager.java:216)
    at org.apache.openjpa.kernel.DelegatingStoreManager.retainConnection(DelegatingStoreManager.java:163)
    at org.apache.openjpa.kernel.BrokerImpl.retainConnection(BrokerImpl.java:3710)
    at org.apache.openjpa.kernel.BrokerImpl.beginStoreManagerTransaction(BrokerImpl.java:1283)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1968)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
    at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532)
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235)
    ... 8 more
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 17 more

I'm confused with the exception. Has anyone met this kind of problem?
Regards,
Vito



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re:Re: [btm-user] Transaction problems with Postgresql

testforvln
Thank you for pointing out this. I looked through the souce code of org.apache.openjpa.lib.jdbc.DecoratingDataSource and I've found that openjpa actually will definitely invoke the function of setTransactionIsolation, and Postgresql will definitely throw the exception of isolation level change. Does that mean openjpa could nealy have no chance of integrating with Postgresql?

Regards,
Vito


At 2014-03-24 17:27:13,"Brett Wooldridge" <[hidden email]> wrote:
OpenJPA is trying to set a transaction isolation level that is different than the default being set on connections in the pool ... and is apparently doing it once a transaction has already started.  One thing to try is to make sure the default configured isolation level for OpenJPA matches the one you've configured on the Driver/DataSource in BTM.

You can see this in the stack trace:

Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
...
org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(...)



On Mon, Mar 24, 2014 at 5:20 PM, Vito <[hidden email]> wrote:
Hi all,

I'm configuring ODE engine with bitronix and postgresql. After following the instructions from here:
http://sathwikbp.blogspot.de/2013/09/apache-ode-on-tomcat-7-with-bitronix.html.
I started the ode engine successfully. But when I deployed process definitions in the /WEB-INF/processes folder, there came the exception:

17:32:05,155 ERROR [ProcessStoreImpl] Error persisting deployment record for {http://sample.bpel.org/bpel/sample}longFlow-1; process will not be available after restart!
<openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:230)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:371)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
    at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
    at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    at org.apache.openjpa.lib.rop.WindowResultList.<init>(WindowResultList.java:57)
    at org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:235)
    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
    at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:255)
    at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:294)
    at org.apache.ode.store.jpa.ConfStoreConnectionJpa.setVersion(ConfStoreConnectionJpa.java:76)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:294)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:793)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 27 more
17:32:05,163 ERROR [ProcessStoreImpl] DbError
java.lang.RuntimeException: java.lang.IllegalStateException: no transaction started on this thread
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:96)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:800)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: no transaction started on this thread
    at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:150)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:94)
    ... 6 more
17:32:05,163 ERROR [DeploymentPoller] Deployment of LongFlow failed, aborting for now.
org.apache.ode.bpel.iapi.ContextException: DbError
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:618)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:172)
    at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.java:160)
    at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPoller.java:60)
    at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(DeploymentPoller.java:251)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:616)
    ... 5 more
Caused by: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:87)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:794)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241)
    at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:85)
    ... 6 more
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.retainConnection(JDBCStoreManager.java:216)
    at org.apache.openjpa.kernel.DelegatingStoreManager.retainConnection(DelegatingStoreManager.java:163)
    at org.apache.openjpa.kernel.BrokerImpl.retainConnection(BrokerImpl.java:3710)
    at org.apache.openjpa.kernel.BrokerImpl.beginStoreManagerTransaction(BrokerImpl.java:1283)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1968)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
    at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532)
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235)
    ... 8 more
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 17 more

I'm confused with the exception. Has anyone met this kind of problem?
Regards,
Vito





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re:Re: [btm-user] Transaction problems with Postgresql

Brett Wooldridge-2
I see lots of threads on the internet about using OpenJPA with PostgreSQL, so my recommendation would be to ask over on the OpenJPA mailing list.  Sounds like a configuration issue to me.

-Brett



On Mon, Mar 24, 2014 at 10:15 PM, Vito <[hidden email]> wrote:
Thank you for pointing out this. I looked through the souce code of org.apache.openjpa.lib.jdbc.DecoratingDataSource and I've found that openjpa actually will definitely invoke the function of setTransactionIsolation, and Postgresql will definitely throw the exception of isolation level change. Does that mean openjpa could nealy have no chance of integrating with Postgresql?

Regards,
Vito


At 2014-03-24 17:27:13,"Brett Wooldridge" <[hidden email]> wrote:
OpenJPA is trying to set a transaction isolation level that is different than the default being set on connections in the pool ... and is apparently doing it once a transaction has already started.  One thing to try is to make sure the default configured isolation level for OpenJPA matches the one you've configured on the Driver/DataSource in BTM.

You can see this in the stack trace:

Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
...
org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(...)



On Mon, Mar 24, 2014 at 5:20 PM, Vito <[hidden email]> wrote:
Hi all,

I'm configuring ODE engine with bitronix and postgresql. After following the instructions from here:
http://sathwikbp.blogspot.de/2013/09/apache-ode-on-tomcat-7-with-bitronix.html.
I started the ode engine successfully. But when I deployed process definitions in the /WEB-INF/processes folder, there came the exception:

17:32:05,155 ERROR [ProcessStoreImpl] Error persisting deployment record for {http://sample.bpel.org/bpel/sample}longFlow-1; process will not be available after restart!
<openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.getConnection(JDBCStoreManager.java:230)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:371)
    at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:339)
    at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:420)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:206)
    at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    at org.apache.openjpa.lib.rop.WindowResultList.<init>(WindowResultList.java:57)
    at org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:235)
    at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
    at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
    at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
    at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:255)
    at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:294)
    at org.apache.ode.store.jpa.ConfStoreConnectionJpa.setVersion(ConfStoreConnectionJpa.java:76)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:294)
    at org.apache.ode.store.ProcessStoreImpl$2.call(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:793)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 27 more
17:32:05,163 ERROR [ProcessStoreImpl] DbError
java.lang.RuntimeException: java.lang.IllegalStateException: no transaction started on this thread
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:96)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:800)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: no transaction started on this thread
    at bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:150)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.rollbackTransaction(DbConfStoreConnectionFactory.java:94)
    ... 6 more
17:32:05,163 ERROR [DeploymentPoller] Deployment of LongFlow failed, aborting for now.
org.apache.ode.bpel.iapi.ContextException: DbError
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:618)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:264)
    at org.apache.ode.store.ProcessStoreImpl.deploy(ProcessStoreImpl.java:172)
    at org.apache.ode.axis2.deploy.DeploymentPoller.check(DeploymentPoller.java:160)
    at org.apache.ode.axis2.deploy.DeploymentPoller.access$300(DeploymentPoller.java:60)
    at org.apache.ode.axis2.deploy.DeploymentPoller$PollingThread.run(DeploymentPoller.java:251)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at org.apache.ode.store.ProcessStoreImpl.exec(ProcessStoreImpl.java:616)
    ... 5 more
Caused by: java.lang.RuntimeException: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:87)
    at org.apache.ode.store.ProcessStoreImpl$Callable.call(ProcessStoreImpl.java:794)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: bitronix.tm.internal.BitronixRollbackException: RuntimeException thrown during beforeCompletion cycle caused transaction rollback
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:241)
    at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
    at org.apache.ode.store.jpa.DbConfStoreConnectionFactory.commitTransaction(DbConfStoreConnectionFactory.java:85)
    ... 6 more
Caused by: <openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Cannot change transaction isolation level in the middle of a transaction
    at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4232)
    at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4197)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88)
    at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:930)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.retainConnection(JDBCStoreManager.java:216)
    at org.apache.openjpa.kernel.DelegatingStoreManager.retainConnection(DelegatingStoreManager.java:163)
    at org.apache.openjpa.kernel.BrokerImpl.retainConnection(BrokerImpl.java:3710)
    at org.apache.openjpa.kernel.BrokerImpl.beginStoreManagerTransaction(BrokerImpl.java:1283)
    at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1968)
    at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1908)
    at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1826)
    at bitronix.tm.BitronixTransaction.fireBeforeCompletionEvent(BitronixTransaction.java:532)
    at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:235)
    ... 8 more
Caused by: org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction
    at org.postgresql.jdbc2.AbstractJdbc2Connection.setTransactionIsolation(AbstractJdbc2Connection.java:944)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy5.setTransactionIsolation(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
    at $Proxy7.setTransactionIsolation(Unknown Source)
    at org.apache.openjpa.lib.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:257)
    at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:95)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:100)
    at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:88)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connectInternal(JDBCStoreManager.java:941)
    at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.connect(JDBCStoreManager.java:926)
    ... 17 more

I'm confused with the exception. Has anyone met this kind of problem?
Regards,
Vito






Loading...