2

我正在运行带有 spring hibernate 和 JSF 应用程序的 JBoss EAP 6.1.0。

项目启动正常,但是当我尝试访问项目上的任何页面时,它会引发“无法复制类型为 [xyz] 的属性”错误。在这篇文章的底部跟踪。[xyz] 类是一个带有@SessionScoped 的JSF @ManagedBean。它使用@ManagedProperty("#{xyz}") 注释连接到另外两个@ViewScoped @ManagedBeans。

我在网上搜索只是为了找到相关的:

这似乎表明它与序列化有关。但由于源代码已经在另一台机器上运行,而我只是在我的机器上设置它,我认为这可能更像是一个 Jboss 配置问题。

任何想法可能导致此问题和可能的修复?

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/testapp].[default]] (http-localhost/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet default threw exception: java.lang.IllegalArgumentException: JBAS018062: 'sessionModelDataMB' attribute with type 'com.test.SessionModelData' cannot be replicated
    at org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:808) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at com.sun.faces.context.SessionMap.put(SessionMap.java:141) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.context.SessionMap.put(SessionMap.java:61) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager$ScopeManager$SessionScopeHandler.handle(BeanManager.java:578) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager$ScopeManager.pushToScope(BeanManager.java:457) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:409) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:268) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at com.sun.faces.mgbean.BeanBuilder$Expression.evaluate(BeanBuilder.java:591) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.ManagedBeanBuilder$BakedBeanProperty.set(ManagedBeanBuilder.java:606) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.ManagedBeanBuilder.buildBean(ManagedBeanBuilder.java:133) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:104) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:408) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:268) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.ManagedBeanELResolver.resolveBean(ManagedBeanELResolver.java:244) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:116) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:72) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.el.parser.AstValue.getTarget(AstValue.java:94) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.el.parser.AstValue.invoke(AstValue.java:239) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:128) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2486) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2161) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:2109) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:289) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.19-redhat-1.jar:2.1.19-redhat-1]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.1.19.1.Final-redhat-1.jar:2.1.19.1.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79) [primefaces-3.5.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) [prettyfaces-jsf2-3.3.3.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:832) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:620) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:553) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:482) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137) [prettyfaces-jsf2-3.3.3.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at au.test.filter.NoCacheFilter.doFilter(NoCacheFilter.java:64) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_25]
4

1 回答 1

3

我将 [xyz] 和所有其他 JSF 托管 Bean 及其包含的变量设置为可序列化。

错误消失了。

我对为什么应用程序在其他人的计算机上使用 Serializable JSF Managed Bean 而不是我的计算机感到困惑。

经过进一步研究,我发现我的 JBoss EAP 6.1 已经为 Infinispan ( http://infinispan.org/ ) 进行了配置,它正在缓存会话对象。因为这些对象不是可序列化的,所以它无法存储它们并因此引发错误。

随着旧的寒冷,一旦我在 jboss 中删除了 Inifispan 配置,错误就消失了。

于 2014-02-18T06:18:57.683 回答