Bonita 6.4.1: org.hibernate.HibernateException: Current transaction is not in progress

Hi,

on

  • Bonita 6.4.1
  • and Tomcat (from the bundle)
  • and MySQL 5.5
  • on Windows 7

during the execution of a Groovy script task sometimes the exception [1] is reported. The script-Task copies some files - about 1.7 GBytes - and takes about one minute.

Bonita 6.4.1 with H2 cannot handle that task at all. With Bonita 6.3.8 we have not seen this problem - not under H2 nor the MySQL-Database.

Are there configuration settings that might avoid the problem?

Greetings

Andreas

Exception:

2015-01-17 18:44:00 org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork
Schwerwiegend: THREAD_ID=126 | HOSTNAME=XXXXXX | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorInstanceReadException : “PROCESS_DEFINITION_ID=6175459456411081770 | PROCESS_NAME=ger_ETIM5_Allgemein | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=6 | ROOT_PROCESS_INSTANCE_ID=5 | FLOW_NODE_DEFINITION_ID=-6642798205916580849 | FLOW_NODE_INSTANCE_ID=22 | FLOW_NODE_NAME=copy the files | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=copy files | CONNECTOR_INSTANCE_ID=11 | org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Current transaction is not in progress”
org.bonitasoft.engine.core.connector.exception.SConnectorInstanceReadException: PROCESS_DEFINITION_ID=6175459456411081770 | PROCESS_NAME=ger_ETIM5_Allgemein | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=6 | ROOT_PROCESS_INSTANCE_ID=5 | FLOW_NODE_DEFINITION_ID=-6642798205916580849 | FLOW_NODE_INSTANCE_ID=22 | FLOW_NODE_NAME=copy the files | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=copy files | CONNECTOR_INSTANCE_ID=11 | org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Current transaction is not in progress
at org.bonitasoft.engine.core.connector.impl.ConnectorInstanceServiceImpl.getConnectorInstance(ConnectorInstanceServiceImpl.java:286)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork$EvaluateParameterAndGetConnectorInstance.call(ExecuteConnectorWork.java:200)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork$EvaluateParameterAndGetConnectorInstance.call(ExecuteConnectorWork.java:162)
at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:288)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:122)
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:70)
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:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.bonitasoft.engine.persistence.SBonitaReadException: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Current transaction is not in progress
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectById(AbstractHibernatePersistenceService.java:436)
at org.bonitasoft.engine.core.connector.impl.ConnectorInstanceServiceImpl.getConnectorInstance(ConnectorInstanceServiceImpl.java:280)
… 15 more
Caused by: org.bonitasoft.engine.services.SPersistenceException: org.hibernate.HibernateException: Current transaction is not in progress
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.getSession(AbstractHibernatePersistenceService.java:232)
at org.bonitasoft.engine.persistence.TenantHibernatePersistenceService.getSession(TenantHibernatePersistenceService.java:102)
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectById(AbstractHibernatePersistenceService.java:434)
… 16 more
Caused by: org.hibernate.HibernateException: Current transaction is not in progress
at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:95)
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:993)
at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.getSession(AbstractHibernatePersistenceService.java:230)
… 18 more

Hi,

I assume you use the legacy Groovy connector (a new one is available since 6.4.0). If you check the catalina log file I think you can find following Bitronix log: transaction timed out

That because, in legacy connector, Groovy script was executed within database transaction and so, if execution takes too long, transaction might timeout.

The new Groovy script connector should fix this issue.

Hi,

yes, there is an exception:

bitronix.tm.BitronixTransaction
Warnung: transaction timed out: a Bitronix Transaction with GTRID

I have choosen the Groovy connector that is not marked as deprecated and on the first test this exection does not occur.

Thank you for the quick and competent response. I’m now optimistic that we can stay with Bontia 6.4.1!