Wicket
  1. Wicket
  2. WICKET-5134

java.lang.NullPointerException at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1520) during Atmosphere eventbus.post() if using WebSockets

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 6.6.0
    • Fix Version/s: 6.7.0
    • Component/s: wicket-atmosphere
    • Labels:
      None
    • Environment:

      Description

      If using WebSockets, it always throws the NPE below:

      Unexpected RuntimeException
      
      Last cause: null
      
      Stacktrace
      
      Root cause:
      
      java.lang.NullPointerException
           at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1520)
           at org.apache.wicket.Component.internalRenderComponent(Component.java:2511)
           at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1488)
           at org.apache.wicket.Component.internalRender(Component.java:2370)
           at org.apache.wicket.Component.render(Component.java:2298)
           at org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:127)
           at org.apache.wicket.ajax.AbstractAjaxResponse.writeComponents(AbstractAjaxResponse.java:214)
           at org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:145)
           at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:363)
           at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
           at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
           at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
           at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
           at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:320)
           at org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:297)
           at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:272)
           at com.soluvas.story.impl.StoryManagerImpl.publish(StoryManagerImpl.java:107)
           at id.co.bippo.comment.story.ProductCommentedStoryPoster.createStoriesAndPublish(ProductCommentedStoryPoster.java:71)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
           at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
           at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
           at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
           at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:100)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
           at java.lang.Thread.run(Thread.java:722)
      
      display page view
      

      Another stacktrace:

      Unexpected RuntimeException
      
      Last cause: null
      
      Stacktrace
      
      Root cause:
      
      java.lang.NullPointerException
           at org.apache.wicket.markup.html.form.Form.onComponentTag(Form.java:1520)
           at org.apache.wicket.Component.internalRenderComponent(Component.java:2511)
           at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1488)
           at org.apache.wicket.Component.internalRender(Component.java:2370)
           at org.apache.wicket.Component.render(Component.java:2298)
           at org.apache.wicket.ajax.XmlAjaxResponse.writeComponent(XmlAjaxResponse.java:127)
           at org.apache.wicket.ajax.AbstractAjaxResponse.writeComponents(AbstractAjaxResponse.java:214)
           at org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:145)
           at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:363)
           at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
           at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97)
           at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)
           at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)
           at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)
           at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:320)
           at org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:297)
           at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:272)
           at com.soluvas.story.impl.StoryManagerImpl.publish(StoryManagerImpl.java:107)
           at id.co.bippo.comment.story.ProductCommentedStoryPoster.createStoriesAndPublish(ProductCommentedStoryPoster.java:71)
           at java.lang.reflect.Method.invoke(Method.java:601)
           at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
           at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
           at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
           at com.google.common.eventbus.AsyncEventBus.access$001(AsyncEventBus.java:34)
           at com.google.common.eventbus.AsyncEventBus$1.run(AsyncEventBus.java:100)
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
           at java.lang.Thread.run(Thread.java:722)
      
      display page view
      

      This bug is always reproducible in my configuration.

      It doesn't occur if comet/long-polling is used instead of websockets. Which means setting below will not trigger the bug:

      		<init-param>
      			<param-name>org.atmosphere.useWebSocket</param-name>
      			<param-value>false</param-value>
      		</init-param>
      

        Issue Links

          Activity

          Emond Papegaaij made changes -
          Link This issue relates to WICKET-5323 [ WICKET-5323 ]
          Hendy Irawan made changes -
          Link This issue relates to WICKET-5323 [ WICKET-5323 ]
          Emond Papegaaij made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 6.7.0 [ 12323964 ]
          Resolution Duplicate [ 3 ]
          Emond Papegaaij made changes -
          Link This issue duplicates WICKET-5084 [ WICKET-5084 ]
          Hendy Irawan made changes -
          Remote Link This issue links to "GitHub Atmosphere Issue #1002 (Web Link)" [ 12129 ]
          Hendy Irawan made changes -
          Environment ONLY if using atmosphere-runtime 1.0.12, 1.0.11, 1.0.10 (regression)
          does not occur with atmosphere-runtime 1.0.8

          java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          ONLY if using atmosphere-runtime 1.0.12, 1.0.11, 1.0.10 (regression)
          does not occur with atmosphere-runtime 1.0.8 and 1.0.9

          java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          Hendy Irawan made changes -
          Environment ONLY if using atmosphere-runtime 1.0.12
          does not occur with atmosphere-runtime 1.0.8

          java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          ONLY if using atmosphere-runtime 1.0.12, 1.0.11, 1.0.10 (regression)
          does not occur with atmosphere-runtime 1.0.8

          java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          Hendy Irawan made changes -
          Environment java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          atmosphere-runtime 1.0.8 & 1.0.12
          ONLY if using atmosphere-runtime 1.0.12
          does not occur with atmosphere-runtime 1.0.8

          java version "1.7.0_15"
          OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.10.1)
          OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

          nginx 1.3.15
          VMware vFabric tc Runtime 2.8.2.RELEASE/7.0.35.B.RELEASE

          wicket-atmosphere 0.8
          wicket 6.6.0
          Hendy Irawan made changes -
          Field Original Value New Value
          Affects Version/s 6.6.0 [ 12323963 ]
          Hendy Irawan created issue -

            People

            • Assignee:
              Emond Papegaaij
              Reporter:
              Hendy Irawan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development