incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske (JIRA)" <>
Subject [jira] [Updated] (JSPWIKI-659) NotSerializableException on Tomcat restart , UserManager not Serializable
Date Sat, 12 Jan 2013 15:02:12 GMT


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 .

JSONRPCBridge has a ref to$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).

> NotSerializableException on Tomcat restart , UserManager not Serializable
> -------------------------------------------------------------------------
>                 Key: JSPWIKI-659
>                 URL:
>             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:
> aborted; com.ecyrd.jspwiki.auth.UserManager$JSONUserModule
> writing aborted; com.ecyrd.jspwiki.
> auth.UserManager$JSONUserModule
>         at
>         at
>    <<< 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 /
> 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:

View raw message