-Gregg-
java.io.NotSerializableException: com.sssw.fw.core.EboWhiteboardEraser
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at java.util.Hashtable.writeObject(Hashtable.java:757)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java
:1864)
at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper
.java:70)
at weblogic.servlet.internal.session.SessionData.getAttribute(SessionDat
a.java:318)
I had a similar exception, and, it appears, that even without clustering,
WebLogic serializes/deserializes objects in session (probably in attempt to
solve ClassCastException's when classes/servlets are changed. In my case
exception looked like this (and only happened after I recompiled the servlet
class, and WebLogic reloaded changed servlet) :
java.io.NotSerializableException: test.MyCounter
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:92)
at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:64)
at weblogic.servlet.internal.session.SessionData.getAttribute(SessionData.java:384)
at weblogic.servlet.internal.session.SessionData.setAttribute(SessionData.java:449)
at test.CounterServlet.service(FooServlet.java:16)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> -Gregg-
--
Dimitri
If you look at com.sssw.fw.core.EboWhiteboardEraser, is it Serializable?
It appears that you have placed an instance of this into the HttpSession
object, so it is subject to replication. I don't know if you ran this a
clustered (or if you did so with WebSphere or SilverStream) but items placed
into HttpSession should be Serializable. From the spec:
SRV.7.7.2 Distributed Environments
...
The servlet container may throw an IllegalArgumentException if an object is
placed into the session that is not Serializable or for which specific
support has
not been made available. The IllegalArgumentException must be thrown for
objects where the container cannot support the mechanism necessary for
migration of a session storing them.
Note that Weblogic is allowing the raw exception to get back to you, instead
of throwing the exception specified in the standard. That's what we call a
"feature" ;-)
Peace,
--
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Gregg McMullin" <gmcm...@silverstream.com> wrote in message
news:3c4c5e6d$2...@newsgroups.bea.com...
Peace,
--
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Gregg McMullin" <gmcm...@silverstream.com> wrote in message
news:3c4d884e$1...@newsgroups.bea.com...
-Gregg-
"Cameron Purdy" <cpu...@tangosol.com> wrote in message
news:3c4d8b81$2...@newsgroups.bea.com...
Yes, that was the servlet spec.
No, it isn't a concern. Just make your objects that go into the session
serializable.
--
Cameron Purdy
Tangosol, Inc.
Clustering Weblogic? You're either using Coherence, or you should be!
Download a Tangosol Coherence eval today at http://www.tangosol.com/
"Gregg McMullin" <gmcm...@silverstream.com> wrote in message
news:3c4d8f3b$1...@newsgroups.bea.com...
> ...
> Peace,
--
Dimitri