Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty server 7.1.3: NonSerializableException thrown when running JAAS and Session Clustering with DB together

thanks for the report, could you log it in issue tracking?

RT -> Jetty

I'll start taking a look now


jesse mcconnell

On Wed, Oct 20, 2010 at 10:35, Mike Jiang <mikej1688@xxxxxxxxx> wrote:
Hi, All
     I have used the jetty server 7.1.3 as the app server for a while. First the JAAS (Java Authentication and Authorization service) is used and it worked with no error. 
     Secondly, we tried to use the Session Clustering with Database, a feature offered by the jetty server also. It's for the case in which there are multiple server instances running in a load balancing environment. The DB is used as a persistent storage for the session's attributes so the attributes can be shared by the server instances.

     However, when the JAAS and Session Clustering with DB are in effect at the same time, a NonSerializableException  was thrown as follows,

     2010-10-06 15:51:08.549:WARN::Problem persisting changed session data id=fredsft3xjud8yc59jaiszql57lo org.eclipse.jetty.server.session.JDBCSessionManager

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at java.util.concurrent.ConcurrentHashMap.writeObject(Unknown Source)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at Source)

      at org.eclipse.jetty.server.session.JDBCSessionManager.updateSession(

      at org.eclipse.jetty.server.session.JDBCSessionManager$Session.complete(

      at org.eclipse.jetty.server.session.AbstractSessionManager.complete(

      at org.eclipse.jetty.server.session.SessionHandler.doScope(

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(

      at org.eclipse.jetty.server.handler.HandlerList.handle(

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(

      at org.eclipse.jetty.server.Server.handle(

      at org.eclipse.jetty.server.HttpConnection.handleRequest(

      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(

      at org.eclipse.jetty.http.HttpParser.parseNext(

      at org.eclipse.jetty.http.HttpParser.parseAvailable(

      at org.eclipse.jetty.server.HttpConnection.handle(


      at org.eclipse.jetty.util.thread.QueuedThreadPool$

      at Source)

   Debugging into the code, it was found that the problem was caused in the following steps:

   1). In the process of the JAAS, the code sets a class: SessionAuthentication as a session attribute. SessionAuthentication is implemented as a serializable object but its member, DefaultUserIdentity is not. So the SessionAuthentication is not a serializable object at all;

   2). In Session Clustering with DB process, the JDBCSessionManager tried to save all the sessions' attributes-all of them must be serializable-to the database. However, one of the attribute, SessionAuthentication, is not a serialiable object, so the above exception is thrown and the process is interrupted.

   Kindly hope you can help me for this.


   M. J.



jetty-users mailing list

Back to the top