jsf-extensions
  1. jsf-extensions
  2. JSF_EXTENSIONS-39

NPE during restoreView after GlassFish is restarted

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      39
    • Status Whiteboard:
      Hide

      target_r2

      Show
      target_r2

      Description

      I believe this issue is related to GF's feature of saving session information
      accross server restarts. When this occurs and the restoreView() phase is
      executed, a NPE is thrown from Dynamic Faces code (I'm sorry I don't have the
      exception anymore... if I get time later, I will add it to this report). This
      is possibily related to a transient variable that is initialized in the
      constructor (which won't happen during deserialization).

      This case exists for "markImmediate" and "modifiedComponents" in
      PartialTraversalViewRoot.

      Let me know if you need clarification.

        Activity

        Hide
        Ed Burns added a comment -

        Research needed.

        Show
        Ed Burns added a comment - Research needed.
        Hide
        Ed Burns added a comment -

        target_r2

        Show
        Ed Burns added a comment - target_r2
        Hide
        kenpaulsen added a comment -

        We are avoiding session related problems by using GF's feature of disabling
        persistent Sessions. This is accomplished by adding the following to your
        sun-web.xml file:

        <session-config>
        <session-manager>
        <manager-properties>
        <property name="sessionFilename" value="" />
        </manager-properties>
        </session-manager>
        </session-config>

        I was not able to reproduce this error after removing our work-a-round.
        However, I did get a different exception, which I was also not able to confirm
        was a Dynamic Faces problem (it's most likely not a DF problem). I'll paste
        that exception below just in case (although the exception doesn't have much
        useful information).

        This bug also talks about the fact that PartialTraversalViewRootHelper.java
        initializes 2 transient fields in its constructor. Since the constructor will
        not be called upon deserialization, these transient variables will not be
        restored. These variables are assumed to be set elsewhere in the class and will
        throw a NPE if not set. markImmediate and modifiedComponents should be
        initailized this way, it is not safe. Or This class should not be Serializable.

        In my testing I did observe some strange behavior where (null) values were being
        set for faces context and other strange behavior. This occurred after I
        restarted the server and attempted to use the same session. In once case the
        app I was using wouldn't even come up... I don't know why.

        I suggest cleaning up the 2 transient variable so they aren't null when they
        shouldn't be (not sure if this will help anything, but it won't hurt!). And the
        closing this bug unless more information can be provided.

        Thanks,

        Ken

        [#|2007-04-20T14:02:34.204-0700|SEVERE|sun-appserver9.1|org.apache.catalina.session.ManagerBase|_ThreadID=13;_ThreadName=pool-1-thread-3;_RequestID=ca8a3a6e-7f26-4231-a0c2-51c0a4cc628c;|PWC2773:
        Exception loading sessions from persistent storage
        java.lang.ArrayStoreException
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at java.util.HashMap.readObject(HashMap.java:1067)
        at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at java.util.HashMap.readObject(HashMap.java:1067)
        at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at java.util.HashMap.readObject(HashMap.java:1067)
        at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
        at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at java.util.HashMap.readObject(HashMap.java:1067)
        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:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at
        org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1809)
        at
        org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1743)
        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:585)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
        at
        org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1074)
        at
        org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:442)
        at
        org.apache.catalina.session.StandardManager.load(StandardManager.java:359)
        at
        org.apache.catalina.session.StandardManager.start(StandardManager.java:751)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:5079)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:307)
        at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45)
        at
        com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
        at
        com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:155)
        at
        com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:171)
        at
        com.sun.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1689)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:938)
        at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45)
        at
        com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283)
        at
        com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:317)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at
        java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

        #]
        Show
        kenpaulsen added a comment - We are avoiding session related problems by using GF's feature of disabling persistent Sessions. This is accomplished by adding the following to your sun-web.xml file: <session-config> <session-manager> <manager-properties> <property name="sessionFilename" value="" /> </manager-properties> </session-manager> </session-config> I was not able to reproduce this error after removing our work-a-round. However, I did get a different exception, which I was also not able to confirm was a Dynamic Faces problem (it's most likely not a DF problem). I'll paste that exception below just in case (although the exception doesn't have much useful information). This bug also talks about the fact that PartialTraversalViewRootHelper.java initializes 2 transient fields in its constructor. Since the constructor will not be called upon deserialization, these transient variables will not be restored. These variables are assumed to be set elsewhere in the class and will throw a NPE if not set. markImmediate and modifiedComponents should be initailized this way, it is not safe. Or This class should not be Serializable. In my testing I did observe some strange behavior where (null) values were being set for faces context and other strange behavior. This occurred after I restarted the server and attempted to use the same session. In once case the app I was using wouldn't even come up... I don't know why. I suggest cleaning up the 2 transient variable so they aren't null when they shouldn't be (not sure if this will help anything, but it won't hurt!). And the closing this bug unless more information can be provided. Thanks, Ken [#|2007-04-20T14:02:34.204-0700|SEVERE|sun-appserver9.1|org.apache.catalina.session.ManagerBase|_ThreadID=13;_ThreadName=pool-1-thread-3;_RequestID=ca8a3a6e-7f26-4231-a0c2-51c0a4cc628c;|PWC2773: Exception loading sessions from persistent storage java.lang.ArrayStoreException at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.util.HashMap.readObject(HashMap.java:1067) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.util.HashMap.readObject(HashMap.java:1067) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.util.HashMap.readObject(HashMap.java:1067) at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.util.HashMap.readObject(HashMap.java:1067) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1809) at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1743) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1074) at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:442) at org.apache.catalina.session.StandardManager.load(StandardManager.java:359) at org.apache.catalina.session.StandardManager.start(StandardManager.java:751) at org.apache.catalina.core.StandardContext.start(StandardContext.java:5079) at com.sun.enterprise.web.WebModule.start(WebModule.java:307) at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45) at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283) at com.sun.appserv.management.util.misc.RunnableBase._submit(RunnableBase.java:155) at com.sun.appserv.management.util.misc.RunnableBase.submit(RunnableBase.java:171) at com.sun.enterprise.web.VirtualServer.startChildren(VirtualServer.java:1689) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1218) at org.apache.catalina.core.StandardHost.start(StandardHost.java:938) at com.sun.enterprise.web.LifecycleStarter.doRun(LifecycleStarter.java:45) at com.sun.appserv.management.util.misc.RunnableBase.runSync(RunnableBase.java:283) at com.sun.appserv.management.util.misc.RunnableBase.run(RunnableBase.java:317) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) #]

          People

          • Assignee:
            jsf-extensions-issues
            Reporter:
            kenpaulsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: