bitronix.tm.BitronixTransaction fireAfterCompletionEvent WARNING: Synchronization.afterCompletion() call failed for org.hibernate.transaction.CacheSynchronization

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bitronix.tm.BitronixTransaction fireAfterCompletionEvent WARNING: Synchronization.afterCompletion() call failed for org.hibernate.transaction.CacheSynchronization

Prabakaran K
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi,

We are having JBPM workflow application which is using Bitronix transaction manager with 2 resources(Oracle & QPID).

JBPM 5.2.0 Final

JAR version List:

BTM:
btm-2.1.3.jar
btm-tomcat55-lifecycle-2.1.3.jar

Oracle:
ojdbc6.jar

Hibernate:
hibernate-3.2.6.ga.jar
hibernate-annotations-3.3.1.GA.jar
hibernate-commons-annotations-3.0.0.ga.jar
hibernate-core-3.3.2.GA.jar
hibernate-entitymanager-3.4.0.GA.jar

Ehcache:
ehcache-1.2.3.jar

QPID:
qpid-all.jar
qpid-client-2.7.1.jar
geronimo-jms_1.1_spec-1.0.jar
qpid-common-2.7.1.jar
commons-lang-2.2.jar
backport-util-concurrent-2.2.jar
mina-filter-ssl-1.0.1.jar
mina-core-1.0.1.jar
commons-collections-3.2.jar
log4j-1.2.12.jar
slf4j-api-1.4.0.jar
slf4j-log4j12-1.4.0.jar

First we got below CacheSynchronization Exception. after that we are getting Exception "Transaction MARKED_FOR_JOINED after isOpen() call" for all transactions. please find both error trace below. If any one faced same kind of issue, please help us to resolve the issue.


Exception1:
Oct 30, 2013 11:37:20 AM bitronix.tm.BitronixTransaction fireAfterCompletionEvent
WARNING: Synchronization.afterCompletion() call failed for org.hibernate.transaction.CacheSynchronization
org.hibernate.exception.GenericJDBCException: Cannot release connection
 at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
 at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:455)
 at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)
 at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:298)
 at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:225)
 at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
 at bitronix.tm.BitronixTransaction.fireAfterCompletionEvent(BitronixTransaction.java:549)
 at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:298)
 at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
 at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1028)
 at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
 at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
 at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
 at com.workflow.jbpm.service.WorkflowManagerImpl$$EnhancerByCGLIB$$3c490356.startProcess(<generated>)
 at com.workflow.web.webservice.WorkflowWebService.launchWorkflow(WorkflowWebService.java:90)
 at sun.reflect.GeneratedMethodAccessor189.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:166)
 at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:82)
 at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:55)
 at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:68)
 at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
 at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:98)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
 at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:104)
 at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:99)
 at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:452)
 at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:196)
 at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:220)
 at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at org.apache.cxf.transport.servlet.AbstractCXFServlet.service(AbstractCXFServlet.java:211)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:227)
 at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:448)
 at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:399)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: error requeuing a JdbcPooledConnection from datasource jdbc/jbpmdb in state ACCESSIBLE with usage count 1 wrapping oracle.jdbc.driver.T4CXAConnection@3eb96b57
 at bitronix.tm.resource.jdbc.JdbcPooledConnection.release(JdbcPooledConnection.java:251)
 at bitronix.tm.resource.jdbc.JdbcConnectionHandle.close(JdbcConnectionHandle.java:103)
 at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:64)
 at $Proxy42.close(Unknown Source)
 at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)
 at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)
 ... 54 more
Caused by: bitronix.tm.internal.BitronixSystemException: cannot close a resource when its XAResource is taking part in an unfinished global transaction
 at bitronix.tm.resource.common.TransactionContextHelper.requeue(TransactionContextHelper.java:140)
 at bitronix.tm.resource.jdbc.JdbcPooledConnection.release(JdbcPooledConnection.java:240)
 ... 62 more

Exception 2:
org.hibernate.AssertionFailure: Transaction MARKED_FOR_JOINED after isOpen() call
 at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:465)
 at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:431)
 at org.drools.persistence.jpa.JpaPersistenceContextManager.beginCommandScopedEntityManager(JpaPersistenceContextManager.java:83)
 at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:339)
 at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.getId(CommandBasedStatefulKnowledgeSession.java:119)
 at com.workflow.jbpm.event.handler.ValidationATSSpecResponseHandler.handleEvent(ValidationATSSpecResponseHandler.java:82)
 at com.workflow.event.service.WorkflowEventService.processEvent(WorkflowEventService.java:52)
 at com.workflow.event.service.WorkflowEventService$$FastClassByCGLIB$$95456485.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
 at com.workflow.event.service.WorkflowEventService$$EnhancerByCGLIB$$7be058f.processEvent(<generated>)
 at com.workflow.event.listener.WorkflowEventListener.processEvent(WorkflowEventListener.java:158)
 at com.workflow.event.listener.WorkflowEventListener.onMessage(WorkflowEventListener.java:134)
 at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)
 at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)
 at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)
 at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)
 at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:241)
 at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
 at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:881)
 at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:61)
 at de.myfoo.commonj.work.FooWorkItem.run(FooWorkItem.java:100)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)


Thanks and Regards,
Praba
Reply | Threaded
Open this post in threaded view
|

Re: bitronix.tm.BitronixTransaction fireAfterCompletionEvent WARNING: Synchronization.afterCompletion() call failed for org.hibernate.transaction.CacheSynchronization

Prabakaran K
This post has NOT been accepted by the mailing list yet.
This post was updated on .
HI,

We found same pattern of issue twise. Did any body faced similar issues in 2.2 or 2.3 of BTM???

BTM team reported that the issue will be fixed in 3.0.0 version but the release date is still not yet given.

Regards,
Praba

Reply | Threaded
Open this post in threaded view
|

Re: bitronix.tm.BitronixTransaction fireAfterCompletionEvent WARNING: Synchronization.afterCompletion() call failed for org.hibernate.transaction.CacheSynchronization

Prabakaran K
This post has NOT been accepted by the mailing list yet.
Hi,

 
Again we got above issue, please any one help on this.

 
Thanks and Regards,

Praba