struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Catling (JIRA)" <j...@apache.org>
Subject [jira] Commented: (WW-2803) TokenSessionStoreInterceptor - puting non Serializable objects in the Session
Date Tue, 23 Feb 2010 10:32:27 GMT

    [ https://issues.apache.org/jira/browse/WW-2803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837188#action_12837188
] 

Rob Catling commented on WW-2803:
---------------------------------

We have production code clustered on Jboss that has disabled the web.xml distributable tag
because of this issue. I feel a bit uncomfortable about this because it relies on session
affinity (sticky sessions) working all the time (I haven't looked into the heuristics of this
mechanism on Jboss/tomcat, but it wouldn't surprise me if this does not work all the time)
and would obviously fail if one or more servers in the cluster were brought down. I only discovered
this problem in our products this morning, so still thinking about the best way forward. Would
appreciate any movement on this issue, or a good alternative suggestion. We are using Struts
2.1.6.

> TokenSessionStoreInterceptor - puting non Serializable objects in the Session
> -----------------------------------------------------------------------------
>
>                 Key: WW-2803
>                 URL: https://issues.apache.org/jira/browse/WW-2803
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.0.11
>         Environment: - CentOS Linux
> - Tomcat 6.0.16
> - Struts 2.0.11
>            Reporter: Juliano Carniel
>            Priority: Critical
>             Fix For: Future
>
>
> I haven't found any issues for this, neither on the mailling lists, so i'm opening one.
> I'm  intercepting an Action with the TokenSession Interceptor, it works fine, but it
is saving a non Serializable object (org.apache.struts2.dispatcher.StrutsRequestWrapper) on
the session, so in a tomcat cluster environment the session cannot be serialized and sent
to the other machine.
> The class that is been saved in the session is the below:
> org.apache.struts2.util.InvocationSessionStore$InvocationContext on the "extraContext"
attribute inside this class
> The DeltaManager is complaning about StrutsRequestWrapper, and indeed it is not serializable.
Could it be made Serializable? Or it is not suposed to be?
> There's a full stackTrace:
> Sep 12, 2008 2:12:57 PM org.apache.catalina.ha.session.DeltaManager requestCompleted
> SEVERE: Unable to serialize delta request for sessionid [3A52D19C6BC693E3B2C388EC050439DF]
> java.io.NotSerializableException: org.apache.struts2.dispatcher.StrutsRequestWrapper
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
> 	at java.util.HashMap.writeObject(HashMap.java:1001)
> 	at sun.reflect.GeneratedMethodAccessor126.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:945)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
> 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
> 	at java.util.HashMap.writeObject(HashMap.java:1001)
> 	at sun.reflect.GeneratedMethodAccessor126.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:945)
> 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
> 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
> 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
> 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
> 	at org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:374)
> 	at org.apache.catalina.ha.session.DeltaRequest.writeExternal(DeltaRequest.java:272)
> 	at org.apache.catalina.ha.session.DeltaRequest.serialize(DeltaRequest.java:287)
> 	at org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaManager.java:633)
> 	at org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1108)
> 	at org.apache.catalina.ha.tcp.ReplicationValve.send(ReplicationValve.java:548)
> 	at org.apache.catalina.ha.tcp.ReplicationValve.sendMessage(ReplicationValve.java:535)
> 	at org.apache.catalina.ha.tcp.ReplicationValve.sendSessionReplicationMessage(ReplicationValve.java:517)
> 	at org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage(ReplicationValve.java:428)
> 	at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:362)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
> 	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> 	at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message