incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Metske (JIRA)" <>
Subject [jira] [Commented] (JSPWIKI-659) NotSerializableException on Tomcat restart , UserManager not Serializable
Date Sun, 13 Jan 2013 16:46:14 GMT


Harry Metske commented on JSPWIKI-659:

Digging a bit deeper in JSONRPCBridge, I read that it is not necessary to put it in the session.
You can use the Global Bridge in that case.
The JavaDoc says :
* The JSONRPCServlet looks for a session specific bridge object
* under the attribute <code>"JSONRPCBridge"</code> in the HttpSession
* associated with the request (without creating a session if one does
* not already exist). If it can't find a session specific bridge instance,
* it will default to invoking against the global bridge.
* <p />
* Using a session specific bridge allows you to export certain object 
* instances or classes only to specific users, and of course these instances
* could be stateful and contain data specific to the user's session.

That is also what JSPWiki does if it cannot get it from the session (line 120 in JSONRPCManager):
        if( bridge == null) bridge = JSONRPCBridge.getGlobalBridge();


As JP mentioned, there are two more RPCCallable classes (JSONSearch, JSONTracker), but they
are registered with the Global Bridge, so they do not have the Serialization issue.
The JSONUserModule BTW is also registered with the Global Bridge, see line 120 in UserManager
        JSONRPCManager.registerGlobalObject( "users", new JSONUserModule(this), new AllPermission(null)

I will attach a new patch again to complete disable session scope JSONBridge , and only use
the Global Bridge.

Am I missing something ?

> 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