Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3576

persistent-sessions fail: NotSerializableException

    XMLWordPrintable

Details

    • Hide

      1. Add the following configuration to you 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>
      2. Start the server
      3. Deploy a simple web application to the server
      4. Access the web app via the browser so that a session is created on the server
      5. Attempt to redeploy the same application, via CLI or Admin Console
      6. The application will deploy successfully, but the logs show that a NotSerializableException is thrown when undeploying the application, followed by a EOFException when trying to reload the persistent session for the new deployment.

      For completeness the application I was deploying was the executor-example from here:
      git@github.com:ChrisRitchie/ee7examples.git

      Show
      1. Add the following configuration to you 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> 2. Start the server 3. Deploy a simple web application to the server 4. Access the web app via the browser so that a session is created on the server 5. Attempt to redeploy the same application, via CLI or Admin Console 6. The application will deploy successfully, but the logs show that a NotSerializableException is thrown when undeploying the application, followed by a EOFException when trying to reload the persistent session for the new deployment. For completeness the application I was deploying was the executor-example from here: git@github.com:ChrisRitchie/ee7examples.git

    Description

      When WildFly is configured to persist sessions during restart/redeploy, upon application undeployment, a NotSerializableException is thrown:

      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

      The application I deployed does not do anything fancy with the session. I do not add anything to the session. It is merely a simple web page with an EJB backend.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            zeus3324 Chris Ritchie (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: