我目前在使用带有portlet插件的struts2在集群环境中实现jsr 168 portlet时遇到问题。每当我使用模型驱动的界面并提交表单时,我都会收到以下堆栈跟踪:
SEVERE: Unable to serialize delta request for sessionid [0F246549355FD6749A5CF6EAE761F77F.worker1]
java.io.NotSerializableException: com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at com.opensymphony.xwork2.inject.util.ReferenceMap.writeObject(ReferenceMap.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
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.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.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
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.writeObject(ObjectOutputStream.java:330)
at org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:389)
at org.apache.catalina.ha.session.DeltaRequest.writeExternal(DeltaRequest.java:287)
at org.apache.catalina.ha.session.DeltaRequest.serialize(DeltaRequest.java:302)
at org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaManager.java:725)
at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1233)
at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1198)
at org.apache.catalina.ha.tcp.ReplicationValve.send(ReplicationValve.java:550)
at org.apache.catalina.ha.tcp.ReplicationValve.sendMessage(ReplicationValve.java:537)
at org.apache.catalina.ha.tcp.ReplicationValve.sendCrossContextSession(ReplicationValve.java:457)
at org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage(ReplicationValve.java:432)
at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:363)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
用于复制问题的示例程序git://github.com/ctwomey1/Struts2PortletExample.git
我在运行pluto 1.1.7的tomcat 6.0.33中复制了这个问题。我在struts 2.1.3.2和2.3.3
上尝试了这个如果有人看到我做错了什么我会喜欢建议:)
更新:我已将此记录为struts2 portlet插件的问题。我正在定期研究解决方案
答案 0 :(得分:0)
不幸的是,这看起来像Struts 2中的已知错误。要重现该错误,您需要一个Struts操作,并将List作为参数,然后在尝试序列化此列表时收到此堆栈跟踪(因为它不是序列化)。完整的错误报告可以在这里找到: