java.lang.RuntimeException: org.hibernate.HibernateException: Unable to locate current JTA transaction

JIRA | Dwain Elson | 1 year ago
  1. 0

    * make a project with storage MySQL, "Opal SQL" schema * import some data * make a view on these data * export view (to any format) => JTA transaction error {code} java.lang.RuntimeException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.obiba.opal.core.service.DataExportServiceImpl.exportTablesToDatasource(DataExportServiceImpl.java:88) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:122) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:153) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:92) at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueTableState(HibernateValueTable.java:287) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getTimestamps(HibernateValueTable.java:197) at org.obiba.magma.support.AbstractValueTableWrapper.getTimestamps(AbstractValueTableWrapper.java:114) at org.obiba.magma.views.View$1.getLastUpdate(View.java:191) at org.obiba.magma.views.View.getVariableEntities(View.java:400) at org.obiba.magma.support.AbstractValueTableWrapper.getVariableEntities(AbstractValueTableWrapper.java:48) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:164) at org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DataExportServiceImpl.java:202) at org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.execute(DataExportServiceImpl.java:171) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:33) at org.obiba.opal.core.service.DataExportServiceImpl.exportTablesToDatasource(DataExportServiceImpl.java:80) ... 9 more {code}

    JIRA | 1 year ago | Dwain Elson
    java.lang.RuntimeException: org.hibernate.HibernateException: Unable to locate current JTA transaction
  2. 0

    * make a project with storage MySQL, "Opal SQL" schema * import some data * make a view on these data * export view (to any format) => JTA transaction error {code} java.lang.RuntimeException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.obiba.opal.core.service.DataExportServiceImpl.exportTablesToDatasource(DataExportServiceImpl.java:88) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:122) at org.obiba.opal.shell.CommandJob.run(CommandJob.java:153) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:92) at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueTableState(HibernateValueTable.java:287) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getTimestamps(HibernateValueTable.java:197) at org.obiba.magma.support.AbstractValueTableWrapper.getTimestamps(AbstractValueTableWrapper.java:114) at org.obiba.magma.views.View$1.getLastUpdate(View.java:191) at org.obiba.magma.views.View.getVariableEntities(View.java:400) at org.obiba.magma.support.AbstractValueTableWrapper.getVariableEntities(AbstractValueTableWrapper.java:48) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:164) at org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DataExportServiceImpl.java:202) at org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.execute(DataExportServiceImpl.java:171) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:33) at org.obiba.opal.core.service.DataExportServiceImpl.exportTablesToDatasource(DataExportServiceImpl.java:80) ... 9 more {code}

    JIRA | 1 year ago | Dwain Elson
    java.lang.RuntimeException: org.hibernate.HibernateException: Unable to locate current JTA transaction
  3. 0

    Exception in thread "Index Synchronization Consumer org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer@13dfc42a" org.hibernate.HibernateException: Unable to locate current JTA transaction at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:92) at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueTableState(HibernateValueTable.java:238) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getTimestamps(HibernateValueTable.java:148) at org.obiba.magma.support.AbstractValueTableWrapper.getTimestamps(AbstractValueTableWrapper.java:102) at org.obiba.magma.views.View$1.getLastUpdate(View.java:190) at org.obiba.magma.views.View.getVariableEntities(View.java:385) at org.obiba.magma.support.AbstractValueTableWrapper.getVariableEntities(AbstractValueTableWrapper.java:51) at org.obiba.magma.concurrent.ConcurrentValueTableReader.read(ConcurrentValueTableReader.java:63) at org.obiba.opal.search.es.EsValuesIndexManager$Indexer.index(EsValuesIndexManager.java:97) at org.obiba.opal.search.es.EsIndexManager$EsIndexer.run(EsIndexManager.java:191) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:391) at org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer.consume(IndexSynchronizationManager.java:229) at org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer.run(IndexSynchronizationManager.java:215) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.lang.Thread.run(Thread.java:745)

    JIRA | 3 years ago | Yannick Marcon
    org.hibernate.HibernateException: Unable to locate current JTA transaction
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception in thread "Index Synchronization Consumer org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer@13dfc42a" org.hibernate.HibernateException: Unable to locate current JTA transaction at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:92) at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueTableState(HibernateValueTable.java:238) at org.obiba.magma.datasource.hibernate.HibernateValueTable.getTimestamps(HibernateValueTable.java:148) at org.obiba.magma.support.AbstractValueTableWrapper.getTimestamps(AbstractValueTableWrapper.java:102) at org.obiba.magma.views.View$1.getLastUpdate(View.java:190) at org.obiba.magma.views.View.getVariableEntities(View.java:385) at org.obiba.magma.support.AbstractValueTableWrapper.getVariableEntities(AbstractValueTableWrapper.java:51) at org.obiba.magma.concurrent.ConcurrentValueTableReader.read(ConcurrentValueTableReader.java:63) at org.obiba.opal.search.es.EsValuesIndexManager$Indexer.index(EsValuesIndexManager.java:97) at org.obiba.opal.search.es.EsIndexManager$EsIndexer.run(EsIndexManager.java:191) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:391) at org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer.consume(IndexSynchronizationManager.java:229) at org.obiba.opal.search.IndexSynchronizationManager$SyncConsumer.run(IndexSynchronizationManager.java:215) at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) at java.lang.Thread.run(Thread.java:745)

    JIRA | 3 years ago | Yannick Marcon
    org.hibernate.HibernateException: Unable to locate current JTA transaction
  6. 0

    This code runs normaly in 6.x. But in 7.x sometines raises exception at runtime only. In design time it works perfectly. PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=23005 | ROOT_PROCESS_INSTANCE_ID=23005 | FLOW_NODE_DEFINITION_ID=5689609688371464350 | FLOW_NODE_INSTANCE_ID=460010 | FLOW_NODE_NAME=Step1 | CONNECTOR_IMPLEMENTATION_CLASS_NAME=test | CONNECTOR_INSTANCE_ID=440005 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.identity.GroupNotFoundException: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:274) at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:147) at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114) at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42) at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66) at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56) at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47) at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.identity.GroupNotFoundException: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:125) at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:268) ... 14 more Caused by: java.util.concurrent.ExecutionException: org.bonitasoft.engine.identity.GroupNotFoundException: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:149) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:122) ... 15 more Caused by: org.bonitasoft.engine.identity.GroupNotFoundException: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.api.impl.IdentityAPIImpl.getGroupByPath(IdentityAPIImpl.java:1015) at org.bonitasoft.engine.api.GroupAPI$getGroupByPath.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at SendEmails.getEmailReceptor(SendEmails.groovy:42) at SendEmails$getEmailReceptor.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) at Download.sendReportToGroupReceptor(Download.groovy:73) at Download$sendReportToGroupReceptor.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at Script1.run(Script1.groovy:4) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:591) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:629) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:600) at org.bonitasoft.connectors.scripting.GroovyScriptConnector.executeBusinessLogic(GroovyScriptConnector.java:48) at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:77) at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:73) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:205) at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:176) at java.util.concurrent.FutureTask.run(FutureTask.java:266) ... 3 more Caused by: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.identity.impl.IdentityServiceImpl.getGroupByPath(IdentityServiceImpl.java:1132) at org.bonitasoft.engine.api.impl.transaction.identity.GetGroupByPath.execute(GetGroupByPath.java:40) at org.bonitasoft.engine.api.impl.IdentityAPIImpl.getGroupByPath(IdentityAPIImpl.java:1012) ... 26 more Caused by: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:350) at org.bonitasoft.engine.identity.impl.IdentityServiceImpl.getGroupByPath(IdentityServiceImpl.java:1124) ... 28 more Caused by: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.getSession(AbstractHibernatePersistenceService.java:215) at org.bonitasoft.engine.persistence.TenantHibernatePersistenceService.getSession(TenantHibernatePersistenceService.java:103) at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:347) ... 29 more Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:89) at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993) at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.getSession(AbstractHibernatePersistenceService.java:213) ... 31 more

    JIRA | 6 months ago | Carlos J. Costa
    org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.identity.GroupNotFoundException: org.bonitasoft.engine.identity.SGroupNotFoundException: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Unable to locate current JTA transaction

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      Unable to locate current JTA transaction

      at org.hibernate.context.internal.JTASessionContext.currentSession()
    2. Hibernate
      SessionFactoryImpl.getCurrentSession
      1. org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:92)
      2. org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:1014)
      2 frames
    3. org.obiba.magma
      MultithreadedDatasourceCopier.copy
      1. org.obiba.magma.datasource.hibernate.HibernateValueTable.getValueTableState(HibernateValueTable.java:287)
      2. org.obiba.magma.datasource.hibernate.HibernateValueTable.getTimestamps(HibernateValueTable.java:197)
      3. org.obiba.magma.support.AbstractValueTableWrapper.getTimestamps(AbstractValueTableWrapper.java:114)
      4. org.obiba.magma.views.View$1.getLastUpdate(View.java:191)
      5. org.obiba.magma.views.View.getVariableEntities(View.java:400)
      6. org.obiba.magma.support.AbstractValueTableWrapper.getVariableEntities(AbstractValueTableWrapper.java:48)
      7. org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:164)
      7 frames
    4. org.obiba.opal
      CommandJob.run
      1. org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.exportTableToDatasource(DataExportServiceImpl.java:202)
      2. org.obiba.opal.core.service.DataExportServiceImpl$ExportActionTemplate$ExportAction.execute(DataExportServiceImpl.java:171)
      3. org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:33)
      4. org.obiba.opal.core.service.DataExportServiceImpl.exportTablesToDatasource(DataExportServiceImpl.java:80)
      5. org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:122)
      6. org.obiba.opal.shell.CommandJob.run(CommandJob.java:153)
      6 frames
    5. Shiro
      SubjectRunnable.run
      1. org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
      2. org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
      2 frames
    6. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames