JBAS018062:无法复制类型为'au.com.test.SessionModelData'的'sessionModelDataMB'属性

时间:2014-02-18 05:36:27

标签: java spring jboss jboss-eap-6

我正在使用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]

1 个答案:

答案 0 :(得分:2)

我将[xyz]和所有其他JSF Managed Bean及其包含的变量设置为Serializable。

错误消失了。

我不知道为什么应用程序在其他人的计算机上使用Serializable JSF Managed Bean而不是我的计算机。

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

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