java.lang.NullPointerException

Apache's JIRA Issue Tracker | Ramon Casha | 1 decade ago
  1. 0

    FacesContext.getCurrentContext is null in the page following a successful login. The login is a standard JSP forms-based login. The form redirects to j_security_check as normal, then presumably it gets automatically redirected to the originally requested page. That's when the error occurs (see stack trace below). If I then refresh the page, it displays correctly. 12:46:14,137 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception java.lang.NullPointerException at org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:995) at org.apache.myfaces.renderkit.html.util.DefaultAddResource.writeResponse(DefaultAddResource.java:786) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:143) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Unknown Source)

    Apache's JIRA Issue Tracker | 1 decade ago | Ramon Casha
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType()
    2. Impl
      HtmlRendererUtils.selectContentType
      1. org.apache.myfaces.renderkit.html.HtmlRendererUtils.selectContentType(HtmlRendererUtils.java:995)
      1 frame
    3. Tomahawk
      ExtensionsFilter.doFilter
      1. org.apache.myfaces.renderkit.html.util.DefaultAddResource.writeResponse(DefaultAddResource.java:786)
      2. org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:143)
      2 frames
    4. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames
    5. JBoss Application Server Tomcat
      ReplyHeaderFilter.doFilter
      1. org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      1 frame
    6. Glassfish Core
      StandardContextValve.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      4 frames
    7. JBoss Application Server Tomcat
      SecurityAssociationValve.invoke
      1. org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
      2. org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
      2 frames
    8. Glassfish Core
      AuthenticatorBase.invoke
      1. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
      1 frame
    9. JBoss Application Server Tomcat
      JaccContextValve.invoke
      1. org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      1 frame
    10. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      2. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      3. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      4. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      4 frames
    11. Grizzly HTTP
      MasterSlaveWorkerThread.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
      2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
      3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      4. org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      4 frames
    12. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame