java.lang.RuntimeException: java.lang.NullPointerException

ICEsoft JIRA Issue Tracker | Nicklas Karlsson | 7 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

    When loading a page with icepush.jar in the app I get a 2010-06-15 11:20:47,910 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Greetings]] (http-127.0.0.1-8080-1) Session event listener threw exception: java.lang.RuntimeException: java.lang.NullPointerException at org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup(SessionDispatcher.java:188) [:] at org.icefaces.push.servlet.ServletEnvironmentListener.sessionCreated(ServletEnvironmentListener.java:43) [:] at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:367) [:] at org.apache.catalina.session.StandardSession.setId(StandardSession.java:341) [:] at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:857) [:] at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291) [:] at org.apache.catalina.connector.Request.doGetSession(Request.java:2587) [:] at org.apache.catalina.connector.Request.getSession(Request.java:2297) [:] at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:841) [:] at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:852) [:] at org.jboss.weld.servlet.ServletLifecycle.restoreSessionContext(ServletLifecycle.java:115) [:1.0.2.SNAPSHOT] at org.jboss.weld.servlet.ServletLifecycle.beginRequest(ServletLifecycle.java:101) [:1.0.2.SNAPSHOT] at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:182) [:1.0.2.SNAPSHOT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:180) [:] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0-SNAPSHOT] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR2] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR2] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0-SNAPSHOT] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93) [:6.0.0-SNAPSHOT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0-SNAPSHOT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0-SNAPSHOT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:] at java.lang.Thread.run(Thread.java:619) [:1.6.0_20] Caused by: java.lang.NullPointerException at org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup(SessionDispatcher.java:186) [:] ... 28 more I'm not shouting *BUG* since it works in 6.0M3 and it *is* a SNAPSHOT, I'm merely tracking down what has changed. Looking at the source it comes from public static void notifySessionStartup(HttpSession session) { SessionDispatcher sessionDispatcher = lookupSessionDispatcher(session.getServletContext()); try { sessionDispatcher.checkSession(session); } catch (Exception e) { throw new RuntimeException(e); } } where the sessionDispatcher is null, I don't see how getting the attr from the SessionContext could fail so how could it fail setting it?

    ICEsoft JIRA Issue Tracker | 7 years ago | Nicklas Karlsson
    java.lang.RuntimeException: java.lang.NullPointerException
  2. 0

    When loading a page with icepush.jar in the app I get a 2010-06-15 11:20:47,910 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/Greetings]] (http-127.0.0.1-8080-1) Session event listener threw exception: java.lang.RuntimeException: java.lang.NullPointerException at org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup(SessionDispatcher.java:188) [:] at org.icefaces.push.servlet.ServletEnvironmentListener.sessionCreated(ServletEnvironmentListener.java:43) [:] at org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:367) [:] at org.apache.catalina.session.StandardSession.setId(StandardSession.java:341) [:] at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:857) [:] at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291) [:] at org.apache.catalina.connector.Request.doGetSession(Request.java:2587) [:] at org.apache.catalina.connector.Request.getSession(Request.java:2297) [:] at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:841) [:] at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:852) [:] at org.jboss.weld.servlet.ServletLifecycle.restoreSessionContext(ServletLifecycle.java:115) [:1.0.2.SNAPSHOT] at org.jboss.weld.servlet.ServletLifecycle.beginRequest(ServletLifecycle.java:101) [:1.0.2.SNAPSHOT] at org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:182) [:1.0.2.SNAPSHOT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:180) [:] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0-SNAPSHOT] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.CR2] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.CR2] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0-SNAPSHOT] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93) [:6.0.0-SNAPSHOT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0-SNAPSHOT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0-SNAPSHOT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:] at java.lang.Thread.run(Thread.java:619) [:1.6.0_20] Caused by: java.lang.NullPointerException at org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup(SessionDispatcher.java:186) [:] ... 28 more I'm not shouting *BUG* since it works in 6.0M3 and it *is* a SNAPSHOT, I'm merely tracking down what has changed. Looking at the source it comes from public static void notifySessionStartup(HttpSession session) { SessionDispatcher sessionDispatcher = lookupSessionDispatcher(session.getServletContext()); try { sessionDispatcher.checkSession(session); } catch (Exception e) { throw new RuntimeException(e); } } where the sessionDispatcher is null, I don't see how getting the attr from the SessionContext could fail so how could it fail setting it?

    ICEsoft JIRA Issue Tracker | 7 years ago | Nicklas Karlsson
    java.lang.RuntimeException: java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup()
    2. org.icefaces.push
      ServletEnvironmentListener.sessionCreated
      1. org.icefaces.push.servlet.SessionDispatcher.notifySessionStartup(SessionDispatcher.java:186)[:]
      2. org.icefaces.push.servlet.ServletEnvironmentListener.sessionCreated(ServletEnvironmentListener.java:43)[:]
      2 frames
    3. Glassfish Core
      RequestFacade.getSession
      1. org.apache.catalina.session.StandardSession.tellNew(StandardSession.java:367)[:]
      2. org.apache.catalina.session.StandardSession.setId(StandardSession.java:341)[:]
      3. org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:857)[:]
      4. org.apache.catalina.session.StandardManager.createSession(StandardManager.java:291)[:]
      5. org.apache.catalina.connector.Request.doGetSession(Request.java:2587)[:]
      6. org.apache.catalina.connector.Request.getSession(Request.java:2297)[:]
      7. org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:841)[:]
      8. org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:852)[:]
      8 frames
    4. Weld Implementation
      WeldListener.requestInitialized
      1. org.jboss.weld.servlet.ServletLifecycle.restoreSessionContext(ServletLifecycle.java:115)[:1.0.2.SNAPSHOT]
      2. org.jboss.weld.servlet.ServletLifecycle.beginRequest(ServletLifecycle.java:101)[:1.0.2.SNAPSHOT]
      3. org.jboss.weld.servlet.WeldListener.requestInitialized(WeldListener.java:182)[:1.0.2.SNAPSHOT]
      3 frames
    5. Glassfish Core
      StandardContextValve.invoke
      1. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:180)[:]
      1 frame
    6. JBoss Application Server Tomcat
      SecurityAssociationValve.invoke
      1. org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)[:6.0.0-SNAPSHOT]
      1 frame
    7. org.jboss.modcluster
      CatalinaContext$RequestListenerValve.invoke
      1. org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)[:1.1.0.CR2]
      2. org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)[:1.1.0.CR2]
      2 frames
    8. JBoss Application Server Tomcat
      SecurityContextEstablishmentValve.invoke
      1. org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)[:6.0.0-SNAPSHOT]
      2. org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:93)[:6.0.0-SNAPSHOT]
      2 frames
    9. Glassfish Core
      ErrorReportValve.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)[:]
      2. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)[:]
      2 frames
    10. JBoss Application Server Tomcat
      CachedConnectionValve.invoke
      1. org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)[:6.0.0-SNAPSHOT]
      1 frame
    11. Glassfish Core
      StandardEngineValve.invoke
      1. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)[:]
      1 frame
    12. JBoss Application Server Tomcat
      ActiveRequestResponseCacheValve.invoke
      1. org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)[:6.0.0-SNAPSHOT]
      1 frame
    13. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)[:]
      1 frame
    14. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)[:]
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)[:]
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)[:]
      3 frames
    15. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)[:1.6.0_20]
      1 frame