activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Earls (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AMQ-4857) WSServlet.doWebSocketConnect throws NPE if called with null protocol
Date Fri, 08 Nov 2013 17:06:17 GMT

     [ https://issues.apache.org/jira/browse/AMQ-4857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kevin Earls resolved AMQ-4857.
------------------------------

    Resolution: Fixed

Added test for null before accessing protocol string


> WSServlet.doWebSocketConnect throws NPE if called with null protocol
> --------------------------------------------------------------------
>
>                 Key: AMQ-4857
>                 URL: https://issues.apache.org/jira/browse/AMQ-4857
>             Project: ActiveMQ
>          Issue Type: Bug
>            Reporter: Kevin Earls
>
> I got the NPE shown below while working on a websocket demo.   WebSocketFactory.acceptWebSocket
calls WSServlet.doWebSocketConnect with the protocol hard coded to null.
> java.lang.NullPointerException
> 	at org.apache.activemq.transport.ws.WSServlet.doWebSocketConnect(WSServlet.java:54)
> 	at org.eclipse.jetty.websocket.WebSocketFactory.acceptWebSocket(WebSocketFactory.java:372)
> 	at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:104)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:367)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> 	at java.lang.Thread.run(Thread.java:744)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message