0

我在 jboss 6.1 上有一个带有接缝 3 的应用程序。我的 bean 主要是对话范围的 bean(有状态会话 bean)。有时我在一个由对话范围 bean 处理的页面上,我离开页面一段时间(比如几分钟),然后单击一个操作链接,我收到以下错误:

11:59:02,313 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] /user/search.xhtml @30,100 value="#{userBean.lazyModel}": javax.ejb.EJBException: Could not activate; failed to restore state: javax.el.ELException: /user/search.xhtml @30,100 value="#{userBean.lazyModel}": javax.ejb.EJBException: Could not activate; failed to restore state
      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114) [:2.1.7-SNAPSHOT]
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [:2.1.7-SNAPSHOT]
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIData.getValue(UIData.java:731) [:2.1.7-SNAPSHOT]
      at org.primefaces.component.datatable.DataTable.getValue(DataTable.java:773) [:]
      at javax.faces.component.UIData.getDataModel(UIData.java:1798) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIData.setRowIndexWithoutRowStatePreserved(UIData.java:484) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIData.setRowIndex(UIData.java:473) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIData.iterate(UIData.java:1927) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIData.processDecodes(UIData.java:1161) [:2.1.7-SNAPSHOT]
      at org.primefaces.component.datatable.DataTable.processDecodes(DataTable.java:554) [:]
      at javax.faces.component.UIForm.processDecodes(UIForm.java:225) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1176) [:2.1.7-SNAPSHOT]
      at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:933) [:2.1.7-SNAPSHOT]
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78) [:2.1.7-SNAPSHOT]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.7-SNAPSHOT]
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [:2.1.7-SNAPSHOT]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [:2.1.7-SNAPSHOT]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [:6.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [:3.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [:3.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.1.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.1.0.Final]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.1.0.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [:6.1.0.Final]
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.1.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.1.0.Final]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.1.0.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159) [:6.1.0.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.1.0.Final]
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.1.0.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.1.0.Final]
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.1.0.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.1.0.Final]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.1.0.Final]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.1.0.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.1.0.Final]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_31]
Caused by: javax.ejb.EJBException: Could not activate; failed to restore state
      at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:318) [:1.7.21]
      at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:491) [:1.7.21]
      at org.jboss.ejb3.stateful.StatefulInstanceAssociationInterceptor.invoke(StatefulInstanceAssociationInterceptor.java:50) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.core.context.SessionInvocationContextAdapter.proceed(SessionInvocationContextAdapter.java:95) [:1.7.21]
      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223) [:0.0.2]
      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353) [:0.0.2]
      at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.2]
      at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.2]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.4]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:182) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.21]
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:333) [:1.7.21]
      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:158) [:1.7.21]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invokeEndpoint(NoInterfaceViewInvocationHandler.java:143) [:6.1.0.Final]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.access$000(NoInterfaceViewInvocationHandler.java:54) [:6.1.0.Final]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler$1.invoke(NoInterfaceViewInvocationHandler.java:103) [:6.1.0.Final]
      at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler$1.proceed(InterceptorInvocationHandler.java:84) [:1.0.0-alpha-1]
      at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:82) [:1.0.0-alpha-1]
      at org.jboss.ejb3.nointerface.impl.async.AsyncClientInterceptor.invoke(AsyncClientInterceptor.java:119) [:6.1.0.Final]
      at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.ObjectMethodsInterceptor.invoke(ObjectMethodsInterceptor.java:78) [:6.1.0.Final]
      at org.jboss.ejb3.sis.InterceptorAssembly$1.proceed(InterceptorAssembly.java:74) [:1.0.0-alpha-1]
      at org.jboss.ejb3.sis.InterceptorAssembly.invoke(InterceptorAssembly.java:90) [:1.0.0-alpha-1]
      at org.jboss.ejb3.sis.reflect.InterceptorInvocationHandler.invoke(InterceptorInvocationHandler.java:110) [:1.0.0-alpha-1]
      at org.jboss.ejb3.nointerface.impl.invocationhandler.NoInterfaceViewInvocationHandler.invoke(NoInterfaceViewInvocationHandler.java:115) [:6.1.0.Final]
      at org.jboss.ejb3.proxy.javassist.JavassistInvocationHandlerAdapter.invoke(JavassistInvocationHandlerAdapter.java:71) [:1.0.0]
      at com.sample.view.UserBean_$$_javassist_6.getLazyModel(UserBean_$$_javassist_6.java) [:]
      at sun.reflect.GeneratedMethodAccessor351.invoke(Unknown Source) [:1.6.0_31]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_31]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_31]
      at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:305) [:6.1.0.Final]
      at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54) [:6.1.0.Final]
      at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163) [:6.1.0.Final]
      at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:299) [:6.1.0.Final]
      at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:125) [:6.1.0.Final]
      at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:62) [:6.1.0.Final]
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:125) [:6.1.0.Final]
      at com.sample.view.UserBean$Proxy$_$$_Weld$Proxy$.getLazyModel(UserBean$Proxy$_$$_Weld$Proxy$.java) [:]
      at com.sample.view.UserBean$Proxy$_$$_WeldClientProxy.getLazyModel(UserBean$Proxy$_$$_WeldClientProxy.java) [:]
      at sun.reflect.GeneratedMethodAccessor357.invoke(Unknown Source) [:1.6.0_31]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_31]
      at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_31]
      at javax.el.BeanELResolver.getValue(BeanELResolver.java:302) [:1.0.0.Final]
      at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [:2.1.7-SNAPSHOT]
      at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [:2.1.7-SNAPSHOT]
      at org.apache.el.parser.AstValue.getValue(AstValue.java:134) [:6.1.0.Final]
      at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187) [:6.1.0.Final]
      at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55) [:6.1.0.Final]
      at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:55) [:6.1.0.Final]
      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [:2.1.7-SNAPSHOT]
      ... 45 more
Caused by: java.io.EOFException
      at java.io.DataInputStream.readByte(DataInputStream.java:250) [:1.6.0_31]
      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readByte(DataContainer.java:716) [:6.1.0.Final]
      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:64) [:6.1.0.Final]
      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643) [:6.1.0.Final]
      at org.jboss.ejb3.stateful.StatefulBeanContext.readExternal(StatefulBeanContext.java:1087) [:1.7.21]
      at org.jboss.serial.persister.ExternalizePersister.readData(ExternalizePersister.java:72) [:6.1.0.Final]
      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412) [:6.1.0.Final]
      at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82) [:6.1.0.Final]
      at org.jboss.serial.objectmetamodel.DataContainer$DataContainerDirectInput.readObject(DataContainer.java:643) [:6.1.0.Final]
      at org.jboss.serial.io.JBossObjectInputStream.readObjectOverride(JBossObjectInputStream.java:163) [:6.1.0.Final]
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344) [:1.6.0_31]
      at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager.java:304) [:1.7.21]
      ... 109 more

似乎 jboss 正在尝试恢复一些不可用的可序列化对象。但我可以找出是哪一个。

有人可以帮忙吗?

谢谢

凯利

4

1 回答 1

0

发生这种情况是因为 SFSB 会话已过期,可能是因为您的 HTTP 会话的超时时间高于 SFSB 的超时时间。可能有帮助的一件事是通过使用注释 @StatefulTimeout 或更改 JBoss AS 配置来增加空闲超时。我这里没有 JBoss AS 6,但请看一下“文件钝化存储”。应该有一个更改“空闲超时”的选项(就像 JBoss AS 7 一样)。

于 2012-08-12T06:25:00.110 回答