Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6758

NPE in AbstractWebSocketProcessor after session times out

    XMLWordPrintableJSON

Details

    Description

      Hi all,

      I'm seeing NPEs when processing websocket messages after the session has timed out:

      java.lang.NullPointerException: null
      	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:245)
      	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.onConnect(AbstractWebSocketProcessor.java:181)
      	at org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor.<init>(JavaxWebSocketProcessor.java:18)
      	at org.apache.wicket.protocol.ws.javax.WicketEndpoint.onOpen(WicketEndpoint.java:41)
      	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:133)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:914)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.base/java.lang.Thread.run(Thread.java:834) 

      Wicket tries to get the PageManager from the session, but the session is null. This case should probably be logged like the case when the page has expired.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            thomas.heigl Thomas Heigl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: