7 Replies Latest reply on Jan 4, 2002 4:21 PM by adrian.brock

    2.4.4 Problem with EJB's

    fbiaggi

      Hello,
      I just installed 2.4.4 final over a 2.4.3 configuration,
      make the configuration changes. The appllication works but there is an intermittent error (see stackTrace):
      This stops the client application and JBoss itself:

      Thanks for help.

      [09:21:03,591,BeanLock] Saw rolled back tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=tpfbi//676, BranchQual=]
      [09:21:03,591,Lagerbereich] TRANSACTION ROLLBACK EXCEPTION:
      javax.transaction.TransactionRolledbackException: Transaction marked for rollback, possibly a timeout; nested exception is:
      java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
      java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:164)
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:137)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:504)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
      at $Proxy113._copyFromEJB(Unknown Source)
      at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.refreshCopyHelper(AbstractEntityAccessBean.java:277)
      at logisuite.stock.common.lagerbereich.LagerbereichAccessBean.refreshCopyHelper(LagerbereichAccessBean.java:180)
      at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.__getCache(AbstractEntityAccessBean.java:97)
      at logisuite.stock.common.lagerbereich.LagerbereichAccessBean.getBereich(LagerbereichAccessBean.java:210)
      at logisuite.stock.eb.detailbewegung.DetailBewegungBean.toTable(DetailBewegungBean.java:953)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:942)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:308)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:197)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:125)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:410)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      at sun.rmi.transport.Transport$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      [09:21:03,601,BeanLock] Saw rolled back tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=tpfbi//676, BranchQual=]
      [09:21:03,601,Dimensionseinheit] TRANSACTION ROLLBACK EXCEPTION:
      javax.transaction.TransactionRolledbackException: Transaction marked for rollback, possibly a timeout; nested exception is:
      java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
      java.lang.RuntimeException: Transaction marked for rollback, possibly a timeout
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:164)
      at org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:137)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:504)
      at org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
      at org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
      at $Proxy116._copyFromEJB(Unknown Source)
      at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.refreshCopyHelper(AbstractEntityAccessBean.java:277)
      at logisuite.stock.eb.dimensionseinheit.DimensionseinheitAccessBean.refreshCopyHelper(DimensionseinheitAccessBean.java:180)
      at com.ibm.ivj.ejb.runtime.AbstractEntityAccessBean.__getCache(AbstractEntityAccessBean.java:97)
      at logisuite.stock.eb.dimensionseinheit.DimensionseinheitAccessBean.getFactorToMeter(DimensionseinheitAccessBean.java:230)
      at logisuite.stock.eb.verpackung.VerpackungBean.ejbStore(VerpackungBean.java:264)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersistenceManager.java:373)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:253)
      at org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:224)
      at org.jboss.ejb.EntityContainer.find(EntityContainer.java:577)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:859)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:234)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:147)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:97)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:142)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:102)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:103)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:421)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:456)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:237)
      at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
      at $Proxy112.findByPrimaryKey(Unknown Source)
      at logisuite.stock.eb.lagerplatz.LagerplatzAccessBean.instantiateEJB(LagerplatzAccessBean.java:136)
      at logisuite.stock.eb.lagerplatz.LagerplatzAccessBean.getBezeichnung(LagerplatzAccessBean.java:343)
      at logisuite.stock.eb.detailbewegung.DetailBewegungBean.toTable(DetailBewegungBean.java:958)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:942)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:308)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:197)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:125)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:138)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:347)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:100)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:170)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:428)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:410)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      at sun.rmi.transport.Transport$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

        • 1. Re: 2.4.4 Problem with EJB's
          marc.fleury

          what is the com.ibm.ivj stuff in the middle?

          marcf

          • 2. Re: 2.4.4 Problem with EJB's
            fbiaggi

            Marc,
            there are IBM accessBeans (a client bean wrapper) that contains primarly a reference to the EJB and a cache of the EJB attributes, this should have no effect on JBoss while the access is done bay the EJB itself.

            The example runs on a single client-server on the same system, in the case there are no updates. I can access this beans from other views without prolems, the problem seem to appear (intermittent), I think, if a large type of beans are requested.

            Ciao.

            • 3. Re: 2.4.4 Problem with EJB's
              fbiaggi

              Marc,
              further info,
              all the application EJB's are accessed thru IBM AccessBean,
              I do not think that the problem is here,
              the same EBJ, maybe, is accessed succesfully, for example, 10 times and after the problem appear, or in other cases, the first access fails and the other works, but is difficult to say when this appear, restarting the application do not show the save behaviour.

              Running on W2K SP2, JDK 1.3.1, MySql 3.23.46

              Ciao.
              Franco

              • 4. Re: 2.4.4 Problem with EJB's

                Hi,

                I'm currently looking at a similar problem in the 3.0
                testsuite.
                The problem occurs when a bean method never returns.
                Eventually the transaction that it is part of times
                out. Giving your exception.

                This might be a container problem though. Like your
                problem the error occurs when one bean calls another.
                The second bean is invoked within the context of the
                first bean's transaction.
                If the transaction is not "propagated", the problem
                goes away.

                I'm still debugging, I'll let you know what I find.

                Regards,
                Adrian

                • 5. Re: 2.4.4 Problem with EJB's

                  Hi,

                  Sorry this was a 3.0 problem. That is now fixed :-)

                  But this is no help to you. :-(

                  Regards,
                  Adrian

                  • 6. Re: 2.4.4 Problem with EJB's
                    fbiaggi

                    Thanks for the answer,

                    how should I proceed to solve this intermittent problem ?

                    All EJB's are accessed via CMP in the same way, no user transacions are defined, all is standard.

                    Thanks

                    • 7. Re: 2.4.4 Problem with EJB's

                      Hi,

                      You could try turning your log4j appender to DEBUG and
                      look at the TxInterceptorCMT messages. This will
                      tell you what transactions are created/committed etc.

                      The problem I was seeing was due to invoking the
                      second bean with a new transaction when a previous transaction on the bean was still active.

                      What transaction attributes do you have on the
                      methods?

                      Try posting to the database forum. You might get
                      some more responses.

                      Regards,
                      Adrian