• New Feature
  • Status: Open
  • 2 Major
  • Resolution:
  • Sessions
  • prodmgmt
  • Reporter: hhuynh
  • July 26, 2011
  • 0
  • Watchers: 1
  • January 09, 2012

Description

We have a known issue with Tomcat valve org.apache.catalina.valves.CometConnectionManagerValve

This valve stores Http Servlet requests in session object, which if clustered with Terracotta, requests would have to be serialized. Hence the stack trace

SEVERE: An exception or error occurred in the container during the request processing
java.lang.RuntimeException: java.io.NotSerializableException: org.terracotta.modules.tomcat.tomcat_6_0.SessionRequest60
    at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:98)
    at com.terracotta.session.SerializedAttributeStore$SerializedAttributeWithCache.<init>(SerializedAttributeStore.java:141)
    at com.terracotta.session.SerializedAttributeStore.put(SerializedAttributeStore.java:60)
    at com.terracotta.session.SessionData.bindAttribute(SessionData.java:455)
    at com.terracotta.session.SessionData.setAttributeReturnOld(SessionData.java:322)
    at com.terracotta.session.SessionData.setAttribute(SessionData.java:313)
    at org.apache.catalina.valves.CometConnectionManagerValve.invoke(CometConnectionManagerValve.java:265)
    at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.tcInvoke(SessionValve55.java:100)
    at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(SessionValve55.java:85)
    at org.terracotta.session.ModernTomcatSessionValve.invoke(ModernTomcatSessionValve.java:66)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:886)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:721)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2256)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.NotSerializableException: org.terracotta.modules.tomcat.tomcat_6_0.SessionRequest60
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
    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 org.terracotta.cache.serialization.DsoSerializationStrategy.serialize(DsoSerializationStrategy.java:60)
    at com.terracotta.session.SerializedAttributeStore$SerializedAttribute.<init>(SerializedAttributeStore.java:96)
    ... 20 more 

There is no workaround. This issue here is for documentation purpose

Comments

Tim Eck 2011-07-26

I agree there is not end-user workaround available at this time, but implementing the intent of this Valve is possible.

I believe it wants to listen to session events such that comet connections can be closed when a session expires. We don’t currently have a way for all nodes to know about session expiration events, but if we did we could write a Valve that _locally_ stored mappings between sessions and comet connections (and could close with respect to session expiration).

Tim Eck 2011-07-26

I’d really think this item should be in JIRA as a bug (or new feature).

ilevy 2011-07-27

also seems like a release-notes issue.

Fiona OShea 2012-01-05

Added to Release Notes for 3.6.0 - I’ve also moved it from a “documentation” issue to “New Feature”

Fiona OShea 2012-01-05

SEnding to DRB to decide when/if we want to fix this