java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • *Steps to reproduce* (or apply attached patch to [issue project|https://github.com/SpringSource/spring-webflow-issues/tree/master/SWF-1468] SWF-1468) # Create composite component that contains a composite:insertFacet or composite:insertChildren # Create a flow with one view-state # Create a view that uses the composite component # Run the application and load the page # Reload the page *twice* (in the same flow state) The NPE is thrown during unmarshaling the flow snapshot. Mojarra's Resource implementation tries to obtain a _ResourceManager_ from the current _FacesContext_. The FacesContext, however, has not been set at this point since _FlowFacesContextListener_ would get notified *after* a the snapshot is restored. This issue has already been reported for version 2.2.1 but SWF-1468 has been set to "Resolved" as of inability to reproduce. {code:title=Stacktrace} java.lang.NullPointerException at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415) 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 org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.deserialize(SerializedFlowExecutionSnapshot.java:194) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.unmarshal(SerializedFlowExecutionSnapshot.java:99) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory.restoreExecution(SerializedFlowExecutionSnapshotFactory.java:80) at org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.restoreFlowExecution(AbstractSnapshottingFlowExecutionRepository.java:89) at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.getFlowExecution(DefaultFlowExecutionRepository.java:115) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:168) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) ... {code}
    via by Pelz Rutsche,
  • *Steps to reproduce* (or apply attached patch to [issue project|https://github.com/SpringSource/spring-webflow-issues/tree/master/SWF-1468] SWF-1468) # Create composite component that contains a composite:insertFacet or composite:insertChildren # Create a flow with one view-state # Create a view that uses the composite component # Run the application and load the page # Reload the page *twice* (in the same flow state) The NPE is thrown during unmarshaling the flow snapshot. Mojarra's Resource implementation tries to obtain a _ResourceManager_ from the current _FacesContext_. The FacesContext, however, has not been set at this point since _FlowFacesContextListener_ would get notified *after* a the snapshot is restored. This issue has already been reported for version 2.2.1 but SWF-1468 has been set to "Resolved" as of inability to reproduce. {code:title=Stacktrace} java.lang.NullPointerException at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415) 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 org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.deserialize(SerializedFlowExecutionSnapshot.java:194) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.unmarshal(SerializedFlowExecutionSnapshot.java:99) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory.restoreExecution(SerializedFlowExecutionSnapshotFactory.java:80) at org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.restoreFlowExecution(AbstractSnapshottingFlowExecutionRepository.java:89) at org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.getFlowExecution(DefaultFlowExecutionRepository.java:115) at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:168) at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183) at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) ... {code}
    via by Pelz Rutsche,
    • java.lang.NullPointerException at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    No Bugmate found.