org.hibernate.TransactionException: Could not register synchronization for container transaction

Hibernate JIRA | Mario Winterer | 6 years ago
  1. 0

    If a mass indexer is used inside a CMP bean in JBoss 6 to rebuild the search index, an org.hibernate.TransactionException is thrown: {noformat} 2010-12-06 14:01:30,720 ERROR [org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer] (Hibernate Search: collectionsloader-1) error during batch indexing: : org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:76) [:3.6.0.Final] at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:89) [:3.6.0.Final] at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473) [:3.6.0.Final] at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:90) [:3.3.0.CR1] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20] at java.lang.Thread.run(Thread.java:619) [:1.6.0_20] {noformat} I've included an example EAR (see attachment) that can be deployed to JBoss 6.0.0.CR1 without any modifications. It contains the required hibernate search libraries and defines one single indexed entity bean {{Contact}} as well as a JBoss service EJB named {{at.mw.contacts:ContactsService}} that can be accessed via JMX console. Use this service to do one of the following things: * add new contacts by specifying firstName/lastName * list all contacts * search for contacts using the search index * rebuild the entire search index (using a MassIndexer) Rebuilding the index fails with the exception listed above. Sources included. (the example uses an in-memory HSQL-DB and the ram directory provider for the lucene index). (see also forum discussion: [Could not register synchronization for container transaction|https://forum.hibernate.org/viewtopic.php?f=9&t=1004515&start=0])

    Hibernate JIRA | 6 years ago | Mario Winterer
    org.hibernate.TransactionException: Could not register synchronization for container transaction
  2. 0

    If a mass indexer is used inside a CMP bean in JBoss 6 to rebuild the search index, an org.hibernate.TransactionException is thrown: {noformat} 2010-12-06 14:01:30,720 ERROR [org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer] (Hibernate Search: collectionsloader-1) error during batch indexing: : org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:76) [:3.6.0.Final] at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:89) [:3.6.0.Final] at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473) [:3.6.0.Final] at org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:90) [:3.3.0.CR1] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20] at java.lang.Thread.run(Thread.java:619) [:1.6.0_20] {noformat} I've included an example EAR (see attachment) that can be deployed to JBoss 6.0.0.CR1 without any modifications. It contains the required hibernate search libraries and defines one single indexed entity bean {{Contact}} as well as a JBoss service EJB named {{at.mw.contacts:ContactsService}} that can be accessed via JMX console. Use this service to do one of the following things: * add new contacts by specifying firstName/lastName * list all contacts * search for contacts using the search index * rebuild the entire search index (using a MassIndexer) Rebuilding the index fails with the exception listed above. Sources included. (the example uses an in-memory HSQL-DB and the ram directory provider for the lucene index). (see also forum discussion: [Could not register synchronization for container transaction|https://forum.hibernate.org/viewtopic.php?f=9&t=1004515&start=0])

    Hibernate JIRA | 6 years ago | Mario Winterer
    org.hibernate.TransactionException: Could not register synchronization for container transaction
  3. 0

    Hibernate Search and Lucene - Creating index throwing Synchronization Error

    Stack Overflow | 6 years ago | Vijay
    org.hibernate.TransactionException: Could not register synchronization for container transaction
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I am running within JBoss inside an EJB using container managed transactions. The transaction is running and my hibernate post-insert event listener gets fired. Within this post-insert event listener I am creating a new session and calling beginTransaction() in order to make further database updates in new session, but inside the same JTA transaction. The begin transaction fails to synchronise with the current JTA transaction but there seems to be no apparent reason as to why this would fail. The listener code causing the problem is... Session newSession = event.getPersister().getFactory().openSession(); newSession.beginTransaction(); On the begin transaction call the exception thrown is 10:56:52,803 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45) at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:70) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at com.dolby.persist.listener.trigger.AuditTrigger.audit(AuditTrigger.java:67) at com.dolby.persist.listener.trigger.AuditTrigger.fireAfterUpdateTrigger(AuditTrigger.java:293) at com.dolby.persist.listener.trigger.TriggerEventListener.onPostUpdate(TriggerEventListener.java:522) at org.hibernate.action.EntityUpdateAction.postUpdate(EntityUpdateAction.java:180) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:159) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1562) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at com.dolby.persist.dao.hibernate.GenericHibernateFinderDAO.findById(GenericHibernateFinderDAO.java:250) at com.dolby.persist.dao.hibernate.GenericHibernateCrudDAO.merge(GenericHibernateCrudDAO.java:112) at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165) 10:56:52,804 ERROR [GenericHibernateCrudDAO] Hibernate Exception org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45) at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:70) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at com.dolby.persist.listener.trigger.AuditTrigger.audit(AuditTrigger.java:67) at com.dolby.persist.listener.trigger.AuditTrigger.fireAfterUpdateTrigger(AuditTrigger.java:293) at com.dolby.persist.listener.trigger.TriggerEventListener.onPostUpdate(TriggerEventListener.java:522) at org.hibernate.action.EntityUpdateAction.postUpdate(EntityUpdateAction.java:180) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:159) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1562) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at com.dolby.persist.dao.hibernate.GenericHibernateFinderDAO.findById(GenericHibernateFinderDAO.java:250) at com.dolby.persist.dao.hibernate.GenericHibernateCrudDAO.merge(GenericHibernateCrudDAO.java:112) at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165) 10:56:52,823 ERROR [DefaultInterceptor] An error occured executing: com.dolby.pics.core.ejb.bean.impl.InventoryBean.save([Ljava.lang.Object;@5c96bfda) com.dolby.pics.core.ejb.SaveFailedException: Could not register synchronization for container transaction at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)

    Hibernate JIRA | 9 years ago | Adrian Pillinger
    org.hibernate.TransactionException: Could not register synchronization for container transaction
  6. 0

    I am running within JBoss inside an EJB using container managed transactions. The transaction is running and my hibernate post-insert event listener gets fired. Within this post-insert event listener I am creating a new session and calling beginTransaction() in order to make further database updates in new session, but inside the same JTA transaction. The begin transaction fails to synchronise with the current JTA transaction but there seems to be no apparent reason as to why this would fail. The listener code causing the problem is... Session newSession = event.getPersister().getFactory().openSession(); newSession.beginTransaction(); On the begin transaction call the exception thrown is 10:56:52,803 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45) at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:70) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at com.dolby.persist.listener.trigger.AuditTrigger.audit(AuditTrigger.java:67) at com.dolby.persist.listener.trigger.AuditTrigger.fireAfterUpdateTrigger(AuditTrigger.java:293) at com.dolby.persist.listener.trigger.TriggerEventListener.onPostUpdate(TriggerEventListener.java:522) at org.hibernate.action.EntityUpdateAction.postUpdate(EntityUpdateAction.java:180) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:159) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1562) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at com.dolby.persist.dao.hibernate.GenericHibernateFinderDAO.findById(GenericHibernateFinderDAO.java:250) at com.dolby.persist.dao.hibernate.GenericHibernateCrudDAO.merge(GenericHibernateCrudDAO.java:112) at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165) 10:56:52,804 ERROR [GenericHibernateCrudDAO] Hibernate Exception org.hibernate.TransactionException: Could not register synchronization for container transaction at org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:45) at org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:70) at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326) at com.dolby.persist.listener.trigger.AuditTrigger.audit(AuditTrigger.java:67) at com.dolby.persist.listener.trigger.AuditTrigger.fireAfterUpdateTrigger(AuditTrigger.java:293) at com.dolby.persist.listener.trigger.TriggerEventListener.onPostUpdate(TriggerEventListener.java:522) at org.hibernate.action.EntityUpdateAction.postUpdate(EntityUpdateAction.java:180) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:159) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:969) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1562) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at com.dolby.persist.dao.hibernate.GenericHibernateFinderDAO.findById(GenericHibernateFinderDAO.java:250) at com.dolby.persist.dao.hibernate.GenericHibernateCrudDAO.merge(GenericHibernateCrudDAO.java:112) at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:99) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165) 10:56:52,823 ERROR [DefaultInterceptor] An error occured executing: com.dolby.pics.core.ejb.bean.impl.InventoryBean.save([Ljava.lang.Object;@5c96bfda) com.dolby.pics.core.ejb.SaveFailedException: Could not register synchronization for container transaction at com.dolby.pics.core.ejb.bean.impl.InventoryBean.save(InventoryBean.java:113) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) at com.dolby.pics.core.ejb.bean.impl.DefaultInterceptor.log(DefaultInterceptor.java:36) at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:278) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)

    Hibernate JIRA | 9 years ago | Adrian Pillinger
    org.hibernate.TransactionException: Could not register synchronization for container transaction

    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.TransactionException

      Could not register synchronization for container transaction

      at org.hibernate.transaction.CMTTransaction.begin()
    2. Hibernate
      CMTTransaction.begin
      1. org.hibernate.transaction.CMTTransaction.begin(CMTTransaction.java:76)[:3.6.0.Final]
      1 frame
    3. org.hibernate.ejb
      JoinableCMTTransaction.begin
      1. org.hibernate.ejb.transaction.JoinableCMTTransaction.begin(JoinableCMTTransaction.java:89)[:3.6.0.Final]
      1 frame
    4. Hibernate
      SessionImpl.beginTransaction
      1. org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)[:3.6.0.Final]
      1 frame
    5. Hibernate Search Engine
      EntityConsumerLuceneworkProducer.run
      1. org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:90)[:3.3.0.CR1]
      1 frame
    6. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_20]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_20]
      3. java.lang.Thread.run(Thread.java:619)[:1.6.0_20]
      3 frames