[
https://issues.apache.org/jira/browse/JSPWIKI-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Harry Metske updated JSPWIKI-659:
---------------------------------
Attachment: ff.patch
Now here is my analysis after digging for a couple of hours:
The problem occurs because we put com.metaparadigm.jsonrpc.JSONRPCBridge in the
HttpSession.
First, I do not understand why we put this in the session, I'd be glad if
someone could explain.
This class is put in the session at
org.apache.wiki.rpc.json.JSONRPCManager.sessionCreated(JSONRPCManager.java:277)
.
JSONRPCBridge has a ref to org.apache.wiki.auth.UserManager$JSONUserModule
(seen in a heapdump).
JSONUserModule has a ref to UserManager, and although it is declared as
volatile, it still causes a NotSerializableException.
UserManager is not Serializable and should not go in the session (it holds refs
to things like UserDatabase, you sure don't want that one in the session).
We now have Sessions of about 4k in size (tomcat's SESSIONS.ser file).
If we do not put JSONRPCBridge in the session (see attached patch), the session
size goes down with a factor 3 (1k).
Any thoughts ?
If not, I'd like to apply the attached patch. (all tests and webtests pass, and
manual testing also does not reveal bugs with this patch).
regards,
Harry
> NotSerializableException on Tomcat restart , UserManager not Serializable
> -------------------------------------------------------------------------
>
> Key: JSPWIKI-659
> URL: https://issues.apache.org/jira/browse/JSPWIKI-659
> Project: JSPWiki
> Issue Type: Bug
> Components: Core & storage
> Affects Versions: 2.8.3, 2.9.1
> Environment: apache-tomcat-6.0.16
> Reporter: Vasilij Pupkin
> Assignee: Harry Metske
> Priority: Minor
> Attachments: ff.patch
>
>
> If you stop Tomcat using ctrl-C and restart it again, there is a
> NotSerializableException on the console. Looks like this has no consequences,
> but still it should not be.
> SCHWERWIEGEND: IOException while loading persisted sessions:
> java.io.WriteAbortedException: writing
> aborted; java.io.NotSerializableException:
> com.ecyrd.jspwiki.auth.UserManager$JSONUserModule
> java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException: com.ecyrd.jspwiki.
> auth.UserManager$JSONUserModule
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
> at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
> <<< SKIPPED >>>
> Starting up background thread: WatchDog for 'JSPWiki'.
> 17.03.2008 11:40:43 org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> 17.03.2008 11:40:43 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 17.03.2008 11:40:43 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/31 config=null
> 17.03.2008 11:40:43 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 4239 ms
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira