org.apache.openjpa.persistence.PersistenceException

Cannot change transaction isolation level in the middle of a transaction

Solutions on the web251

  • via openjpa-users by Vito, 9 months ago
    Cannot change transaction isolation level in the middle of a transaction
  • Cannot change transaction isolation level in the middle of a transaction
  • via ode-user by Vito, 9 months ago
    Cannot change transaction isolation level in the middle of a transaction
  • Stack trace

    • 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

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago