glassfish
  1. glassfish
  2. GLASSFISH-17156

Sessions not restored on redeploy with keepstate=true due to NPE in MultiViewHandler.calculateLocale().

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: jsf
    • Labels:
      None
    • Environment:

      Red Hat Linux, Glassfish 3.1.1

      Description

      I am trying to redeploy an app in Glassfish 3.1.1 from an EAR file. With a session active I ran the following asadmin command from the command line:

      ./asadmin redeploy --keepstate=true --name=[appname] [parthToEarFile]

      The redeploy is successful but the session is not kept after redeployment. I get the following stack trace in the log:

      [#|2011-08-06T20:38:46.961-0500|WARNING|glassfish3.1.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=30;_ThreadName=Thread-2;|WEB0517: Unable to restore sessions for web module [] from previous deployment
      java.lang.NullPointerException
      at com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)
      at com.ocpsoft.pretty.faces.application.PrettyViewHandler.calculateLocale(PrettyViewHandler.java:82)
      at javax.faces.application.ViewHandlerWrapper.calculateLocale(ViewHandlerWrapper.java:108)
      at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:467)
      at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162)
      at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:417)
      at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at java.util.ArrayList.readObject(ArrayList.java:593)
      at sun.reflect.GeneratedMethodAccessor1347.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at java.util.HashMap.readObject(HashMap.java:1030)
      at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1666)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1322)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at java.util.HashMap.readObject(HashMap.java:1030)
      at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at java.util.HashMap.readObject(HashMap.java:1030)
      at sun.reflect.GeneratedMethodAccessor1222.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1951)
      at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1859)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
      at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1144)
      at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:492)
      at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1573)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2002)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1651)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:360)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:126)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:662)

        Issue Links

          Activity

          Hide
          Manfred Riem added a comment -

          Can you verify if this is still a problem on the latest 2.1 release?

          Show
          Manfred Riem added a comment - Can you verify if this is still a problem on the latest 2.1 release?
          Hide
          Manfred Riem added a comment -

          Closing as duplicate, see the associated issue for resolution.

          Show
          Manfred Riem added a comment - Closing as duplicate, see the associated issue for resolution.
          Hide
          rogerk added a comment -

          The stack trace shows that another JSF library is being used (Pretty Faces).
          Until I can get the application and libs to test with I am excluding from 3.1.2.

          Show
          rogerk added a comment - The stack trace shows that another JSF library is being used (Pretty Faces). Until I can get the application and libs to test with I am excluding from 3.1.2.
          Hide
          Shing Wai Chan added a comment -

          The NPE is from com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)

          Assign to jsf team for investigation.

          Show
          Shing Wai Chan added a comment - The NPE is from com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188) Assign to jsf team for investigation.
          Hide
          Hong Zhang added a comment -

          assign to web team for initial evaluation

          Show
          Hong Zhang added a comment - assign to web team for initial evaluation

            People

            • Assignee:
              rogerk
              Reporter:
              gguarnera
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: