You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mufaddal Khumri <MK...@allegromedical.com> on 2005/07/12 19:12:33 UTC

Tomcat session deserialization issue ?

Hello all,

 

We have a webapp deployed on Tomcat 5.5.7 and Apache/2.0.53. We have
serialized our sessions. We get this error in our log on start of the
webapp:

 

WARN  - Cannot serialize session attribute SESSION_DATA for session
1948F0D64D1B2679896325B06457A075

java.io.NotSerializableException:
org.apache.catalina.connector.RequestFacade

        at java.io.ObjectOutputStream.writeObject0(Unknown Source)

        at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

        at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

        at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
Source)

        at java.io.ObjectOutputStream.writeObject0(Unknown Source)

        at java.io.ObjectOutputStream.writeObject(Unknown Source)

        at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.
java:1436)

        at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSess
ion.java:911)

        at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.jav
a:516)

        at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:
462)

        at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:66
4)

        at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)

        at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:89
2)

        at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1147
)

        at
org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1119)

        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
2)

        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)

        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1051)

        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)

        at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:445)

        at
org.apache.catalina.core.StandardService.stop(StandardService.java:512)

        at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)

        at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:561)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)

        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

WARN  - Cannot serialize session attribute SESSION_DATA for session
1DB7954590DC27243A584C999392B7FD

java.io.NotSerializableException:
org.apache.catalina.connector.RequestFacade

        at java.io.ObjectOutputStream.writeObject0(Unknown Source)

        at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)

        at java.io.ObjectOutputStream.writeSerialData(Unknown Source)

        at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown
Source)

        at java.io.ObjectOutputStream.writeObject0(Unknown Source)

        at java.io.ObjectOutputStream.writeObject(Unknown Source)

        at
org.apache.catalina.session.StandardSession.writeObject(StandardSession.
java:1436)

        at
org.apache.catalina.session.StandardSession.writeObjectData(StandardSess
ion.java:911)

        at
org.apache.catalina.session.StandardManager.doUnload(StandardManager.jav
a:516)

        at
org.apache.catalina.session.StandardManager.unload(StandardManager.java:
462)

        at
org.apache.catalina.session.StandardManager.stop(StandardManager.java:66
4)

        at
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)

        at
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:89
2)

        at
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1147
)

        at
org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1119)

        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
2)

        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)

        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1051)

        at
org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1063)

        at
org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:445)

        at
org.apache.catalina.core.StandardService.stop(StandardService.java:512)

        at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)

        at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:561)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)

        at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

 

SESSION_DATA is a Serialized class (implements Serializable).

 

This is what the server.xml looks like:

 

<Server port="8005" shutdown="SHUTDOWN">

 

  <Service name="Catalina">

    <Connector port="8009" protocol="AJP/1.3" />

    

      <Engine name="Catalina" defaultHost="localhost">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

             resourceName="UserDatabase" />

     <Host name="localhost" appBase="webapps"

       unpackWARs="true" autoDeploy="true"

       antiJarLocking="true" antiResourceLocking="true"

       xmlValidation="false" xmlNamespaceAware="false">

      </Host>

    </Engine>

    

  </Service>

</Server>

 

Any ideas as to how to resolve this issue?

 

Regards,

Mufaddal


------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential 
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this 
email in error please notify the system manager. Please
note that any views or opinions presented in this email 
are solely those of the author and do not necessarily
represent those of the company. Finally, the recipient
should check this email and any attachments for the 
presence of viruses. The company accepts no liability for
any damage caused by any virus transmitted by this email.
Consult your physician prior to the use of any medical
supplies or product.
------------------------------------------------------------------------------------------