|Title|com.ecyrd.jspwiki.PageLock not serializable
|Date|30-Jan-2005 18:44:59 EET
|Version|2.1.134
|Submitter|80.138.236.224
|[Bug criticality]|[JSPWiki:LightBug]
|Browser version|
|[Bug status]|ClosedBug
|[PageProvider] used|Johann
|Servlet Container|Orion (<http://www.orionserver.com>) 1.5.2
|Operating System|Linux x86
|URL|
|Java version|Sun Java 1.4.1_07-b02

Found this one in my application.log:

1/30/05 5:19 PM [...]: Error persisting state
java.io.NotSerializableException: com.ecyrd.jspwiki.PageLock
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
        at com.evermind.server.ApplicationServer._wv(Unknown Source)
        at com.evermind.server.http.EvermindHttpSession._en(Unknown Source)
        at com.evermind._ah._tnc(Unknown Source)
        at com.evermind._ah._bre(Unknown Source)
        at com.evermind._ah._hf(Unknown Source)
        at com.evermind._ab._hf(Unknown Source)
        at com.evermind._ae._hf(Unknown Source)
        at com.evermind.server.ApplicationServer._hf(Unknown Source)
        at com.evermind._ie.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:536)

If you are putting something into the session, it must be Serializable.

----

No, it does not have to be.  Look at the javadocs and spec...  The servlet container should not attempt to serialize non-serializable objects.

Besides, I think that it's okay that the page lock is lost in serialization.  It may be that this can be a problem in some clustering systems, but I doubt anyone wants to run a clustered version of JSPWIki...

-- JanneJalkanen

----

Fixed in 2.3.20