1

我在我的项目中使用 PrimeFaces2.0,在 weblogic 集群环境中部署我的应用程序后发现以下错误。

有没有人知道为什么会发生

java.rmi.MarshalException: failed to marshal update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;Ljava.lang.Object;); nested exception is: 
  java.io.NotSerializableException: com.sun.faces.context.FacesContextImpl
  at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:92)
  at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:221)
  at weblogic.cluster.replication.ReplicationManager_1036_WLStub.update(Unknown Source)
  at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at weblogic.cluster.replication.SecureReplicationInvocationHandler$ReplicationServicesInvocationAction.run(SecureReplicationInvocationHandler.java:194)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.cluster.replication.SecureReplicationInvocationHandler.invoke(SecureReplicationInvocationHandler.java:164)
  at $Proxy114.update(Unknown Source)
  at weblogic.cluster.replication.ReplicationManager.sendUpdateRequestToSecondary(ReplicationManager.java:740)
  at weblogic.cluster.replication.ReplicationManager.updateSecondary(ReplicationManager.java:662)
  at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession(ReplicatedSessionData.java:641)
  at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:83)
  at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2913)
  at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2888)
  at weblogic.servlet.internal.ServletResponseImpl$1.run(ServletResponseImpl.java:1504)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1498)
  at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1498)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Caused By: java.io.NotSerializableException: com.sun.faces.context.FacesContextImpl
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at java.util.HashMap.writeObject(HashMap.java:1001)
  at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at java.util.HashMap.writeObject(HashMap.java:1001)
  at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at java.util.HashMap.writeObject(HashMap.java:1001)
  at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at java.util.HashMap.writeObject(HashMap.java:1001)
  at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
  at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at weblogic.servlet.internal.session.ReplicatedSessionChange.writeExternal(ReplicatedSessionChange.java:154)
  at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1429)
  at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1398)
  at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
  at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
  at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:618)
  at weblogic.rjvm.MsgAbbrevOutputStream.writeObjectWL(MsgAbbrevOutputStream.java:609)
  at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:38)
  at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:88)
  at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:221)
  at weblogic.cluster.replication.ReplicationManager_1036_WLStub.update(Unknown Source)
  at sun.reflect.GeneratedMethodAccessor507.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at weblogic.cluster.replication.SecureReplicationInvocationHandler$ReplicationServicesInvocationAction.run(SecureReplicationInvocationHandler.java:194)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.cluster.replication.SecureReplicationInvocationHandler.invoke(SecureReplicationInvocationHandler.java:164)
  at $Proxy114.update(Unknown Source)
  at weblogic.cluster.replication.ReplicationManager.sendUpdateRequestToSecondary(ReplicationManager.java:740)
  at weblogic.cluster.replication.ReplicationManager.updateSecondary(ReplicationManager.java:662)
  at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession(ReplicatedSessionData.java:641)
  at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:83)
  at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2913)
  at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2888)
  at weblogic.servlet.internal.ServletResponseImpl$1.run(ServletResponseImpl.java:1504)
  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
  at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1498)
  at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1498)
  at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
  at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

似乎是尝试在集群环境中序列化 FacesContext 对象

4

1 回答 1

1

会话同步将序列化会话的内容和范围为SessionView的 JSF bean 。

该错误发生在嵌套的序列化调用内部,因此该FacesContext实例似乎被存储在会话中的对象或 JSF bean 中的某些代码意外保存。

您应该找到所有FacesContext.getInstance()调用并检查上下文是否未保存在某处。

于 2013-05-17T14:01:06.697 回答