3 Replies Latest reply on Mar 2, 2004 7:50 AM by Andrew Oswald

    Standard Stateful Session Bean Error

    Bjoern Weis Newbie

      Hi,

      I have got the following error:

      java.rmi.ServerException: Could not get EJBObject; nested exception is:
      java.rmi.NoSuchObjectException: Could not activate; failed to restore state; CausedByException is:
      /jboss-3.2.3/server/N01-1/tmp/sessions/ItemBrowserSes-dr1njepr-3/dr1nl0kr-4.ser (No such file or directory)

      The ItemBrowserSes (form the SPECjAppServer2004 Benchmark) is a Standard Stateful Session Bean and I use the default server configuration of the jboss3.2.3 on a Suse 8.2 Linux. I cannot say when the error happens, because in the server.log is no entry made for this error. Maybe I have to turn on some more logging (at the moment I use the standard logging). When I use the Clustered Stateful Session Bean and all server configuration this error won't occour.

      Regards
      Björn

        • 1. Re: Standard Stateful Session Bean Error
          Andrew Oswald Newbie

          Greetings.

          Due to the xx.ser, my hunch is that the bean timed out while passivated. If you haven't tried this, put some timestamp logging in ejbPassivate. Also, put similar timestamp logging in catch blocks for the component interface biz methods. Next time you get the error, ensure the bean's timeout wasn't surpassed - hence a "does not exist" state and inability to activate.

          good luck.

          • 2. Re: Standard Stateful Session Bean Error
            Bjoern Weis Newbie

            Thanx for the reply oz59.

            I have now turn on the trace logging for org.jboss.ejb.plugins, this must also log passivation of beans. I have also tried to make System.outs.println in the ejbPassivate Method, but this method is never called before the error occured. The error was not written in the server.log, because a method catch all errors and write it only in a html file (this was the error message I post first). With the trace logging of org.jboss.ejb.plugins the error was written in the server.log file.

            I cut'n'past here the important parts (I hope):


            2004-02-28 11:40:16,508 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
            2004-02-28 11:40:16,508 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_SUPPORTS for create
            2004-02-28 11:40:16,508 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@17f6796#0#class org.spec.jappserver.orders.itemBrowserSes.ejb.ItemBrowserSesEJB
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryPromotion, entry=key: dr7kf3p9-9, object: 489670, entry: 18caee7
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryAdded, entry=key: dr7kf3p9-9, object: 489670, entry: 18caee7
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor] invokerBInding is null in ProxyFactoryFinder
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=getItems
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getItems
            2004-02-28 11:40:16,509 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
            2004-02-28 11:40:16,510 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=koblenz//385, BranchQual=]
            2004-02-28 11:40:16,510 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryPromotion, entry=key: dr7kf3p9-9, object: 489670, entry: 18caee7
            2004-02-28 11:40:16,510 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryPromotion, entry=key: dr7kf3oa-5, object: 12eec98, entry: 1af1ad8
            2004-02-28 11:40:16,510 TRACE [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] entryAdded, entry=key: dr7kf3oa-5, object: 12eec98, entry: 1af1ad8
            2004-02-28 11:40:16,510 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=create
            ...
            2004-02-28 11:40:18,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for getItems
            2004-02-28 11:40:18,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
            2004-02-28 11:40:18,567 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl [FormatId=257, GlobalId=koblenz//447, BranchQual=]
            2004-02-28 11:40:18,567 TRACE [org.jboss.ejb.plugins.StatefulSessionInstancePool] Get instance org.jboss.ejb.plugins.StatefulSessionInstancePool@17f6796#0#class org.spec.jappserver.orders.itemBrowserSes.ejb.ItemBrowserSesEJB
            2004-02-28 11:40:18,568 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Attempting to activate; ctx=org.jboss.ejb.StatefulSessionEnterpriseContext@d5e26b
            2004-02-28 11:40:18,568 DEBUG [org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager] Reading session state from: /net/paris/export/scratch/home_stud/weis/jboss-3.2.3/server/N01-1/tmp/sessions/ItemBrowserSes-dr7kbz9c-3/dr7kf3p9-9.ser
            2004-02-28 11:40:18,569 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreEntityCommand.ItemEnt] Rows affected = 1
            2004-02-28 11:40:18,569 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.ItemEnt#findByPrimaryKey] Executing SQL: SELECT i_id FROM O_ITEM WHERE i_id=?
            2004-02-28 11:40:18,569 TRACE [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.ItemEnt#findByPrimaryKey] Set parameter: index=1, jdbcType=VARCHAR, value=00001MITEM0000000005
            2004-02-28 11:40:18,569 DEBUG [org.jboss.ejb.plugins.AbstractInstanceCache] Activation failure
            javax.ejb.EJBException: Could not activate; failed to restore state; CausedByException is:
            /net/paris/export/scratch/home_stud/weis/jboss-3.2.3/server/N01-1/tmp/sessions/ItemBrowserSes-dr7kbz9c-3/dr7kf3p9-9.ser (No such file or directory)
            at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:324)
            at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)
            at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:107)
            at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:210)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
            at org.jboss.ejb.Container.invoke(Container.java:700)
            at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
            at org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)
            at $Proxy106.getItems(Unknown Source)
            at org.spec.jappserver.servlet.helper.SpecAction_Local.getVehicleQuotes(SpecAction_Local.java:359)
            at org.spec.jappserver.servlet.helper.SpecServletAction.doVehicleQuotes(SpecServletAction.java:644)
            at org.spec.jappserver.servlet.SpecAppServlet.performTask(SpecAppServlet.java:197)
            at org.spec.jappserver.servlet.SpecAppServlet.doGet(SpecAppServlet.java:96)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
            at java.lang.Thread.run(Thread.java:534)
            java.io.FileNotFoundException: /net/paris/export/scratch/home_stud/weis/jboss-3.2.3/server/N01-1/tmp/sessions/ItemBrowserSes-dr7kbz9c-3/dr7kf3p9-9.ser (No such file or directory)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.(FileInputStream.java:106)
            at org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:308)
            at org.jboss.ejb.plugins.StatefulSessionInstanceCache.activate(StatefulSessionInstanceCache.java:90)
            at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:107)
            at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:210)
            at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
            at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
            at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
            at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
            at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
            at org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
            at org.jboss.ejb.Container.invoke(Container.java:700)
            at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375)
            at org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)
            at $Proxy106.getItems(Unknown Source)
            at org.spec.jappserver.servlet.helper.SpecAction_Local.getVehicleQuotes(SpecAction_Local.java:359)
            at org.spec.jappserver.servlet.helper.SpecServletAction.doVehicleQuotes(SpecServletAction.java:644)
            at org.spec.jappserver.servlet.SpecAppServlet.performTask(SpecAppServlet.java:197)
            at org.spec.jappserver.servlet.SpecAppServlet.doGet(SpecAppServlet.java:96)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:197)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)
            at java.lang.Thread.run(Thread.java:534)


            Any idea why the state of the stateful session bean get lost, only for the "Standard Stateful Session Bean"? The driver is call this bean through a http call of an Servlet, it does not fail ever, sometimes it worked.

            Regards
            Björn

            • 3. Re: Standard Stateful Session Bean Error
              Andrew Oswald Newbie

              I'd like to try and duplicate the error (minus SuSE), but am not all too familiar w/ the SPECjAppServer2004 Benchmark. Is this something you can download? I went on the site and didn't see anything (at least particular to '04).

              Also for future reference, this post is probably better suited to the "JBoss User - EJB/JBoss" forum section. Please post any response info there..

              cheers.