Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10841

Cannot upgrade to WebSocket connection when using Spring 4 WebSocket with embedded Tomcat 8.0.0-RC1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Works as Designed
    • Affects Version/s: 4.0 M2
    • Fix Version/s: None
    • Component/s: Messaging:WebSocket
    • Labels:
    • Last commented by a User:
      true

      Description

      I'm building a Spring 4 driven application with an embedded Tomcat 8 and SockJS to support WebSocket clients.
      The latest 4.0.0.BUILD-SNAPSHOT (14.08.2013) as well as 4.0.0.M2 cannot upgrade the incoming HTTP connection to WS with the following exception (for the snapshot version):

      2013-08-16 10:49:02,711 15913 ERROR [http-nio-8080-exec-4] org.apache.coyote.http11.Http11NioProtocol - Error reading request, ignored                    
      java.lang.NullPointerException: null
      at org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.<init>(WsRemoteEndpointImplServer.java:57) ~[tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:116) ~[tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) ~[tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1592) [tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) [tomcat-embed-core-8.0.0-RC1.jar:8.0.0-RC1]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_17]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_17]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]
      

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            sshcherbakov Sergey Shcherbakov
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 37 weeks ago