ICEpush
  1. ICEpush
  2. PUSH-18

Null pointer exception in createPushId is causing bugus pushIds to be sent to the client

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Alpha3
    • Component/s: Push Server
    • Labels:
      None
    • Environment:
      Affects Glassfish (and probably others as well)

      Description

      It seems that sometime the javacript call for ice.push.createPushId will send a request without the browser id header. This in turn causes a null pointer exception on the server which will response with an error html snippet in place of the request push id. Even though the status of the response is 500 - the consumer of the js client api will not be told an error occurred and will simply be handed the snippet of HTML as the push id. This causes much grief in the subsequent API calls.

      the following stacktrace is seen in the GF3 server logs:

      java.lang.RuntimeException: java.lang.RuntimeException: wrapped Exception: java.lang.NullPointerException
      at org.icepush.servlet.ICEpushServlet.service(ICEpushServlet.java:26)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      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:332)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
      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)
      Caused by: java.lang.RuntimeException: wrapped Exception: java.lang.NullPointerException
      at org.icepush.servlet.MainServlet.service(MainServlet.java:66)
      at org.icepush.servlet.ICEpushServlet.service(ICEpushServlet.java:20)
      ... 25 more
      Caused by: java.lang.NullPointerException
      at org.icepush.servlet.BrowserDispatcher.getBrowserIDFromCookie(BrowserDispatcher.java:76)
      at org.icepush.servlet.BrowserDispatcher.service(BrowserDispatcher.java:47)
      at org.icepush.servlet.PathDispatcher.service(PathDispatcher.java:44)
      at org.icepush.servlet.MainServlet.service(MainServlet.java:44)
      ... 26 more

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20321 Thu Jan 21 11:32:11 MST 2010 mircea.toma PUSH-18 Return null if no cookie is found.
        Files Changed
        Commit graph MODIFY /scratchpads/snowplow/core/src/main/java/org/icepush/servlet/BrowserDispatcher.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20320 Thu Jan 21 11:26:40 MST 2010 mircea.toma PUSH-18 Throw exception when seerver error is received.
        Files Changed
        Commit graph MODIFY /scratchpads/snowplow/core/src/main/javascript/application.js

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Patrick Wilson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: