Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4541

NullPointerException trying to destroy view

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0-RC3
    • 4.0.0-RC4
    • General
    • None

    Description

      Attached is a PrimeFaces test reproducer with a View Scoped bean and when you press "Rebuild View" it generates the following stack trace.

      PrimeFaces Test Reproducer

       

       java.lang.NullPointerException
      	at org.apache.myfaces.cdi.util.AbstractContextualStorageHolder.destroyAll(AbstractContextualStorageHolder.java:216)
      	at org.apache.myfaces.cdi.util.AbstractContextualStorageHolder.destroyAll(AbstractContextualStorageHolder.java:247)
      	at org.apache.myfaces.cdi.view.ViewScopeContextualStorageHolder$Proxy$_$$_WeldClientProxy.destroyAll(Unknown Source)
      	at org.apache.myfaces.cdi.view.ViewScopeContext.destroyAll(ViewScopeContext.java:202)
      	at org.apache.myfaces.cdi.view.ViewScopeCDIMap.clear(ViewScopeCDIMap.java:147)
      	at org.apache.myfaces.view.ViewScopeProxyMap.clear(ViewScopeProxyMap.java:151)
      	at org.apache.myfaces.context.servlet.FacesContextImplBase.setViewRoot(FacesContextImplBase.java:303)
      	at jakarta.faces.context.FacesContextWrapper.setViewRoot(FacesContextWrapper.java:248)
      	at org.omnifaces.util.FacesLocal.setViewRoot(FacesLocal.java:455)
      	at org.omnifaces.util.Faces.setViewRoot(Faces.java:737)
      	at org.primefaces.test.OmniCdiViewScopedBean.rebuildView(OmniCdiViewScopedBean.java:70)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      	at org.apache.el.parser.AstValue.invoke(AstValue.java:252)

       

       

      Attachments

        Issue Links

          Activity

            People

              tandraschko Thomas Andraschko
              melloware Melloware
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: