java.lang.NullPointerException

Spring JIRA | Casper Mout | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The error below occurs when refreshing(browser refresh button) a webflow view-state with a jsf view. The JSF view has a composite component on it, for example: {code:xml} <html ... xmlns:on="http://java.sun.com/jsf/composite/onzin"> ... <on:onzintag/> ... {code} resources/onzin/onzintag.xhtml: {code:xml} <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://java.sun.com/jsf/composite"> <cc:interface> </cc:interface> <cc:implementation> ONZIN </cc:implementation> </html> {code} {code} [#|2011-03-29T11:57:29.451+0200|WARNING|glassfish3.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=Thread-1;|StandardWrapperValve[Spring MVC Dispatcher Servlet]: PWC1406: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception java.lang.NullPointerException at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792) ... at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.deserialize(SerializedFlowExecutionSnapshot.java:194) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.unmarshal(SerializedFlowExecutionSnapshot.java:99) ... {code}

    Spring JIRA | 6 years ago | Casper Mout
    java.lang.NullPointerException
  2. 0

    The error below occurs when refreshing(browser refresh button) a webflow view-state with a jsf view. The JSF view has a composite component on it, for example: {code:xml} <html ... xmlns:on="http://java.sun.com/jsf/composite/onzin"> ... <on:onzintag/> ... {code} resources/onzin/onzintag.xhtml: {code:xml} <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://java.sun.com/jsf/composite"> <cc:interface> </cc:interface> <cc:implementation> ONZIN </cc:implementation> </html> {code} {code} [#|2011-03-29T11:57:29.451+0200|WARNING|glassfish3.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=29;_ThreadName=Thread-1;|StandardWrapperValve[Spring MVC Dispatcher Servlet]: PWC1406: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception java.lang.NullPointerException at com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415) at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792) ... at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.deserialize(SerializedFlowExecutionSnapshot.java:194) at org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.unmarshal(SerializedFlowExecutionSnapshot.java:99) ... {code}

    Spring JIRA | 6 years ago | Casper Mout
    java.lang.NullPointerException
  3. 0

    *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}

    Spring JIRA | 5 years ago | Pelz Rutsche
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    *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}

    Spring JIRA | 5 years ago | Pelz Rutsche
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sun.faces.application.resource.ResourceImpl.readExternal()
    2. JSF
      ResourceImpl.readExternal
      1. com.sun.faces.application.resource.ResourceImpl.readExternal(ResourceImpl.java:415)
      1 frame
    3. Java RT
      ObjectInputStream.readExternalData
      1. java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
      1 frame