1 Reply Latest reply on Feb 26, 2008 1:35 PM by Pete Muir

    Transaction problem on reinvocation

    Lars Schmidt Newbie

      Hi All,


      we have a JavaBean calling a stateless SessionBean.
      The stateless SessionBean gets a new Object to work on.


      Everything works fine until the same object should be returned by simultaneous request.

      In this case the method is called again in order to get another object for the second request. But the second call aborted within a not active transaction.


      Enclosed code examples.


      The stripped-down JavaBean:


      @Name("acquisitionAction")
      @Scope(ScopeType.CONVERSATION)
      public class AcquisitionAction {
      
      @In(create = true)
      private AcquisitionService acquisitionService;
      
      @In(create = true)
      private FollowupService followupService;
      
      @In(required = false)
      @Out(required = true)
      private Distribution currentDistribution;
      
      @Begin(join = true)
      @Create
      public void init() {
           while (true) {
                try {
                     currentDistribution = acquisitionService.getNextDistribution(selectedUser);
                     break;
                } catch (DistributionLockedException e) {
                     // try again
                }
           }
      }
      
      public void callAutomaticFollowup() {
           // close the current distribution
           followupService.createAutomaticFollowup();
           // get a new one
           init();
      }
      
      }
      



      The shortened SessionBean:


      @Stateless
      @Name("acquisitionService")
      public class AcquisitionServiceImpl implements AcquisitionService {
           
      // The persistence context.
      @In(create = true)
      private EntityManager inaEntityManager;
      
      public Distribution getNextDistribution(User user) throws DistributionLockedException {
                     
           Distribution distribution = null;
           
           ... code to find a new distribution ...
      
           // check if distribution is already in use
           if (distribution != null) {
                try {
                     distribution.updated(user);
                     inaEntityManager.flush();
                } catch (PersistenceException e) {
                     log.debug("Distribution locked by another user: " + distribution.getDistributionId());
                     throw new DistributionLockedException();
                }
           }
           
           log.debug("GetNextDistribution successful: " + distribution.getDistributionId());
           return distribution;
      }
      
      }
      



      The ERROR:


      2008-02-25 11:37:55,828 DEBUG [de.codecentric.ina.callcenter.service.AcquisitionServiceImpl] GetNextDistribution successful: 1119953
      2008-02-25 11:38:08,219 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [de.codecentric.eismann.ina.business.domain.Distribution#1119953]
           at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1761)
           at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2403)
           at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2303)
           at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2603)
           at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
           at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
           at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
           at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
           at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
           at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:296)
           at org.jboss.seam.persistence.EntityManagerProxy.flush(EntityManagerProxy.java:83)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:166)
           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 org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
           at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
      2008-02-25 11:38:08,266 INFO  [de.codecentric.ina.callcenter.service.AcquisitionServiceImpl] Distribution locked by another user: 1119953
      2008-02-25 11:38:08,281 WARN  [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null
      2008-02-25 11:38:08,281 ERROR [org.hibernate.util.JDBCExceptionReporter] Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48])
      2008-02-25 11:38:08,406 ERROR [org.jboss.seam.web.ExceptionFilter] uncaught exception
      javax.servlet.ServletException: /edit/cc_acquisition.xhtml @92,155 actionListener="#{acquisitionAction.callAutomaticFollowup}": javax.ejb.EJBTransactionRolledbackException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
           at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      2008-02-25 11:38:08,406 ERROR [org.jboss.seam.web.ExceptionFilter] exception root cause
      javax.faces.el.EvaluationException: /edit/cc_acquisition.xhtml @92,155 actionListener="#{acquisitionAction.callAutomaticFollowup}": javax.ejb.EJBTransactionRolledbackException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
           at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
           at javax.faces.component.UICommand.broadcast(UICommand.java:86)
           at org.ajax4jsf.framework.ajax.AjaxActionComponent.broadcast(AjaxActionComponent.java:47)
           at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
           at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
           at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
           at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
           at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
           at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      Caused by: javax.ejb.EJBTransactionRolledbackException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
           at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
           at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
           at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
           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:102)
           at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
           at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
           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.localInvoke(StatelessContainer.java:211)
           at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
           at $Proxy248.getNextDistribution(Unknown Source)
           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.seam.util.Reflections.invoke(Reflections.java:20)
           at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
           at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
           at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
           at org.javassist.tmp.java.lang.Object_$$_javassist_53.getNextDistribution(Object_$$_javassist_53.java)
           at de.codecentric.ina.callcenter.action.AcquisitionAction.init(AcquisitionAction.java:73)
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
           at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:72)
           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 org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
           at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
           at sun.reflect.GeneratedMethodAccessor290.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)
      Caused by: org.hibernate.exception.GenericJDBCException: Cannot open 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.openConnection(ConnectionManager.java:424)
           at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
           at org.hibernate.loader.Loader.doQuery(Loader.java:661)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
           at org.hibernate.loader.Loader.doList(Loader.java:2211)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
           at org.hibernate.loader.Loader.list(Loader.java:2090)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:72)
      Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48]; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48])
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
           at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
           at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:421)
           at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
           at org.hibernate.loader.Loader.doQuery(Loader.java:661)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
           at org.hibernate.loader.Loader.doList(Loader.java:2211)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
           at org.hibernate.loader.Loader.list(Loader.java:2090)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:72)
           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 org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
           at org.jboss.seam.interceptors.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48]
           at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:290)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
           at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
           at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:421)
           at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
           at org.hibernate.loader.Loader.doQuery(Loader.java:661)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
           at org.hibernate.loader.Loader.doList(Loader.java:2211)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
           at org.hibernate.loader.Loader.list(Loader.java:2090)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:72)
           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 org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
      2008-02-25 11:38:08,469 ERROR [org.jboss.seam.exceptions.DebugPageHandler] redirecting to debug page
      javax.resource.ResourceException: Transaction is not active: tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=SCHMIDT/48, BranchQual=, localId=48]
           at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:290)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
           at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
           at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:421)
           at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
           at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
           at org.hibernate.loader.Loader.doQuery(Loader.java:661)
           at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
           at org.hibernate.loader.Loader.doList(Loader.java:2211)
           at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
           at org.hibernate.loader.Loader.list(Loader.java:2090)
           at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
           at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
           at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
           at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
           at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
           at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
           at de.codecentric.ina.callcenter.service.AcquisitionServiceImpl.getNextDistribution(AcquisitionServiceImpl.java:72)
           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 org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
           at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
      



      Does anyone know a solution ?


      Thanks in advance.


      Lars