You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/01/01 20:27:03 UTC

[jira] [Commented] (WICKET-6483) JavaxUpgradeHttpRequest can cause NullPointerException

    [ https://issues.apache.org/jira/browse/WICKET-6483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16307542#comment-16307542 ] 

ASF subversion and git services commented on WICKET-6483:
---------------------------------------------------------

Commit 4b8ac4c8cc14f2926312e2572fee4299256e7b11 in wicket's branch refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=4b8ac4c ]

WICKET-6483 JavaxUpgradeHttpRequest can cause NullPointerException

WICKET-6493 WebSocket SessionIds are wrong (HttpSession one used instead of Websocket one) + NPE if no HttpSession is found during Handshake Request

Revert the change to use 'request.getSession(false) because this breaks WicketTester/WebSocketTester infrastructure


> JavaxUpgradeHttpRequest can cause NullPointerException
> ------------------------------------------------------
>
>                 Key: WICKET-6483
>                 URL: https://issues.apache.org/jira/browse/WICKET-6483
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-native-websocket
>    Affects Versions: 7.9.0
>            Reporter: Thomas Schemmick
>            Assignee: Martin Grigorov
>            Priority: Minor
>
> The method "getSession(boolean create)" from JavaxUpgradeHttpRequest does not match the specification given by the interface HttpServletRequest. 
> It does not create a new HttpSession if "create" is true.
> This can cause a NullPointerException in AbstractWebSocketProcessor, in line 104:
> {code:java}
> this.sessionId = request.getSession(true).getId();
> {code}
> Full stacktrace:
> ERROR 13/10/2017 13:01 org.apache.coyote.http11.Http11NioProtocol: Error reading request, ignored
> java.lang.NullPointerException: null
> 	at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.<init>(AbstractWebSocketProcessor.java:104) ~[wicket-native-websocket-core-7.9.0.jar:7.9.0]
> 	at org.apache.wicket.protocol.ws.javax.JavaxWebSocketProcessor.<init>(JavaxWebSocketProcessor.java:46) ~[wicket-native-websocket-javax-7.9.0.jar:7.9.0]
> 	at org.apache.wicket.protocol.ws.javax.WicketEndpoint.onOpen(WicketEndpoint.java:64) ~[wicket-native-websocket-javax-7.9.0.jar:7.9.0]
> 	at org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.init(WsHttpUpgradeHandler.java:133) ~[tomcat-embed-websocket-8.5.15.jar:8.5.15]
> 	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:907) [tomcat-embed-core-8.5.15.jar:8.5.15]
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-embed-core-8.5.15.jar:8.5.15]
> 	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.15.jar:8.5.15]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_141]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_141]
> 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.15.jar:8.5.15]
> 	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_141]
> This can happen when the client trys to create a new WebSocket connection after the session has run out.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)