[ 
https://issues.apache.org/struts/browse/WW-2803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wes Wannemacher updated WW-2803:
--------------------------------

    Fix Version/s:     (was: 2.1.7)
                   Future

For this issue, I would say yes and no... The nature of TokenSessionInterceptor 
is to just sort of "work" when presented with an invalid token. The way it is 
done is to store everything up into the session to be retrieved when the user 
double-submits (or whatever else they can do that causes an invalid token)... 
The issue I linked to this one I am going to close because I don't see any way 
to make it work across servers, this one though, I am going to leave open but 
mark into the future because I don't see any background thread. I'm not sure if 
it can be done, but I am tempted to try another scope, but request scope won't 
work since the nature of invalid.token is that a new request is issued. Anyhow, 
I'm going to mark it for the future because it might be possible to make this 
work in a cluster, but any solution would probably require significant 
refactoring.

> TokenSessionStoreInterceptor - puting non Serializable objects in the Session
> -----------------------------------------------------------------------------
>
>                 Key: WW-2803
>                 URL: https://issues.apache.org/struts/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.

Reply via email to