NullPointerException with long call stack in broker log file when calling brokers WebSocket listener from plain HTTP client

Solution Verified - Updated -

Issue

When calling the brokers WebSocket listener from a plain HTTP client, it always generates a java.lang.NullPointerException with full call stack in the broker log file.

2019-09-11 13:47:26,213 | WARN  | tp1107434553-125 | ServletHandler                   | 108 - org.eclipse.jetty.util - 9.2.23.v20171218 | /
java.lang.NullPointerException
    at org.apache.activemq.transport.ws.jetty9.WSServlet.doGet(WSServlet.java:74)[162:org.apache.activemq.activemq-osgi:5.11.0.redhat-630396]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[48:javax.servlet-api:3.1.0]
    at org.eclipse.jetty.websocket.servlet.WebSocketServlet.service(WebSocketServlet.java:167)[118:org.eclipse.jetty.websocket.servlet:9.2.23.v20171218]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[48:javax.servlet-api:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[106:org.eclipse.jetty.servlet:9.2.23.v20171218]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[106:org.eclipse.jetty.servlet:9.2.23.v20171218]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[104:org.eclipse.jetty.security:9.2.23.v20171218]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1129)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[106:org.eclipse.jetty.servlet:9.2.23.v20171218]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.server.Server.handle(Server.java:499)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)[105:org.eclipse.jetty.server:9.2.23.v20171218]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[98:org.eclipse.jetty.io:9.2.23.v20171218]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[108:org.eclipse.jetty.util:9.2.23.v20171218]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[108:org.eclipse.jetty.util:9.2.23.v20171218]
    at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]

This pollutes the broker log.

Environment

  • JBoss A-MQ 6.3
  • WebSocket transport

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In