You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Niranjan Kundapur <ni...@air2web.com> on 2002/06/19 17:31:26 UTC

NotSerializableException: org.apache.xerces.dom.NodeListCache

Hello,

I am using Xerces 2.0.0 (or 2.0.1) that came with Xalan 2.3.1. I am storing
a DOM node (defered-node-expansion=false) in a Weblogic session. I see the
following NotSerializableException in the log.  I did not seen this
exception when using Xerces 1.4.3 (defered-node-expansion defaulted, which I
guess means true). 

I looked at the source code; NodeListCache does not implement Serializable.
A co-worker noticed that this Exception occurs when the server is under
heavy load. This is reasonable because heavy load may prompt Weblogic to
serialize session data. This exception is infrequent under moderate load.

Is it incorrect to store Xerces DOM nodes in the session? I would think it
is legal because NodeImpl does implement Serializable. 

Thanks in advance for any clarification,
Niranjan 

<Error> <HTTP Session> <Could not deserialize session data
java.io.NotSerializableException: org.apache.xerces.dom.NodeListCache
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1827)
        at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
2)
        at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
4)
        at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:456)
        at
weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
va:438)
        at
weblogic.servlet.internal.session.SessionData.removeValue(SessionData.java:3
03)
        at
weblogic.servlet.internal.session.SessionData.remove(SessionData.java:547)
        at
weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(Mem
orySessionContext.java:44)
        at
weblogic.servlet.internal.session.SessionData.invalidate(SessionData.java:49
3)

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org