java.lang.NullPointerException

Spring JIRA | Charles Chappell | 7 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Response writer is interrupted and the page up until, but not including the closing </h:form> tag is rendered, along with an error that extra content was found at the end of the document. The following is from the server log, pinpointing the error. It seems like Faces doesn't double check to make sure SWF is actually being called, then tries to write out the null SWF state to the form, causing this exception, and rendering the Faces Servlet useless if run directly. {code}WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at org.springframework.faces.webflow.FlowViewResponseStateManager.writeState(FlowViewResponseStateManager.java:84) at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:155) at org.springframework.faces.webflow.FlowViewStateManager.writeState(FlowViewStateManager.java:114) at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:221) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:397) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126) at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:637){code}

    Spring JIRA | 7 years ago | Charles Chappell
    java.lang.NullPointerException
  2. 0

    Response writer is interrupted and the page up until, but not including the closing </h:form> tag is rendered, along with an error that extra content was found at the end of the document. The following is from the server log, pinpointing the error. It seems like Faces doesn't double check to make sure SWF is actually being called, then tries to write out the null SWF state to the form, causing this exception, and rendering the Faces Servlet useless if run directly. {code}WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at org.springframework.faces.webflow.FlowViewResponseStateManager.writeState(FlowViewResponseStateManager.java:84) at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:155) at org.springframework.faces.webflow.FlowViewStateManager.writeState(FlowViewStateManager.java:114) at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:221) at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:397) at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126) at org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57) at com.sun.grizzly.ContextTask.run(ContextTask.java:69) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309) at java.lang.Thread.run(Thread.java:637){code}

    Spring JIRA | 7 years ago | Charles Chappell
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.springframework.faces.webflow.FlowViewResponseStateManager.writeState()
    2. org.springframework.faces
      FlowViewResponseStateManager.writeState
      1. org.springframework.faces.webflow.FlowViewResponseStateManager.writeState(FlowViewResponseStateManager.java:84)
      1 frame
    3. JSF
      StateManagerImpl.writeState
      1. com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:155)
      1 frame
    4. org.springframework.faces
      FlowViewStateManager.writeState
      1. org.springframework.faces.webflow.FlowViewStateManager.writeState(FlowViewStateManager.java:114)
      1 frame
    5. JSF
      MultiViewHandler.renderView
      1. com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:221)
      2. com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:397)
      3. com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
      3 frames
    6. org.springframework.faces
      FlowViewHandler.renderView
      1. org.springframework.faces.webflow.FlowViewHandler.renderView(FlowViewHandler.java:99)
      1 frame
    7. JSF
      LifecycleImpl.render
      1. com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
      2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      3. com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      3 frames
    8. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
      1 frame
    9. Glassfish Core
      StandardPipeline.invoke
      1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
      2. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      3. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
      4. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      4 frames
    10. Glassfish
      PESessionLockingStandardPipeline.invoke
      1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
      2. com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
      2 frames
    11. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
      2. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
      3. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
      3 frames
    12. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
      1 frame
    13. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
      13 frames