5 Replies Latest reply on Jul 17, 2014 10:47 AM by Chris Ritchie

    Persistent Sessions bug? Failed to persist sessions: NotSerializableException

    Chris Ritchie Newbie

      Version: WildFly-8.1.0-Final

      I have configured my standalone.xml to use persistence sessions on redeploy. When ever I redeploy I get the errors below relating to persistence sessions. Here is the line I have added to my standalone.xml:

       

      <servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">

          <jsp-config/>

          <persistent-sessions path="session" relative-to="jboss.server.temp.dir"/>

      </servlet-container>

       

      This is the error upon saving the session upon undeploy:

       

      15:59:19,459 WARN  [io.undertow.servlet] (MSC service thread 1-10) UT015010: Failed to persist sessions: java.io.NotSerializableException: org.wildfly.extension.undertow.AbstractPersistentSessionManager$SessionEntry

        at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:894)

        at org.jboss.marshalling.river.RiverMarshaller.doWriteObject(RiverMarshaller.java:683)

        at org.jboss.marshalling.AbstractObjectOutput.writeObject(AbstractObjectOutput.java:62)

        at org.jboss.marshalling.AbstractMarshaller.writeObject(AbstractMarshaller.java:115)

        at org.wildfly.extension.undertow.DiskBasedModularPersistentSessionManager.persistSerializedSessions(DiskBasedModularPersistentSessionManager.java:72)

        at org.wildfly.extension.undertow.AbstractPersistentSessionManager.persistSessions(AbstractPersistentSessionManager.java:63)

        at io.undertow.servlet.handlers.SessionRestoringHandler.stop(SessionRestoringHandler.java:90) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]

        at io.undertow.servlet.core.DeploymentManagerImpl.stop(DeploymentManagerImpl.java:512) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext(UndertowDeploymentService.java:113)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stop(UndertowDeploymentService.java:100)

        at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)

        at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]

      Caused by: an exception which occurred:

        in object java.util.HashMap@b0096a85

       

       

      Obviously then this error occurs when redeploying, due to the one above.

       

      15:03:04,766 WARN  [io.undertow.servlet] (MSC service thread 1-11) UT015008: Failed to load development mode persistent sessions: java.io.EOFException: Read past end of file

        at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:155)

        at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:298)

        at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:253)

        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:213)

        at org.jboss.marshalling.river.RiverUnmarshaller.doReadMapObject(RiverUnmarshaller.java:199)

        at org.jboss.marshalling.river.RiverUnmarshaller.readMapData(RiverUnmarshaller.java:823)

        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:686)

        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:213)

        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:45)

        at org.wildfly.extension.undertow.DiskBasedModularPersistentSessionManager.loadSerializedSessions(DiskBasedModularPersistentSessionManager.java:94)

        at org.wildfly.extension.undertow.AbstractPersistentSessionManager.loadSessionAttributes(AbstractPersistentSessionManager.java:83)

        at io.undertow.servlet.handlers.SessionRestoringHandler.start(SessionRestoringHandler.java:56) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]

        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:476) [undertow-servlet-1.0.0.Final.jar:1.0.0.Final]

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]

      Caused by: an exception which occurred:

        in map value at index [0] of size [1]