-
Bug
-
Resolution: Fixed
-
Normal
-
9.0.0, 8.6.4
-
Security Level: Jimmy
-
ZK 9.5.1 S1
Steps to Reproduce
Follow the example to use ZK's Websocket utilities
https://www.zkoss.org/wiki/ZK_Developer%27s_Reference/Integration/Miscellenous/Websocket_Channel
Current Result
Sep 03, 2020 4:16:34 PM org.eclipse.jetty.server.HttpChannel handleException WARNING: /zksupport86/echo/ java.lang.NullPointerException at org.zkoss.zk.ui.http.ZKWebSocket.extractConnectionUuid(ZKWebSocket.java:106) at org.zkoss.zk.ui.http.ZKWebSocket.modifyHandshake(ZKWebSocket.java:56) at org.eclipse.jetty.websocket.jsr356.server.JsrCreator.createWebSocket(JsrCreator.java:149) at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:230) at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:258) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:567) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
Expected Result
No Exception/ working websocket connection
Debug Information
Missing NPE check in the implementation for ZK-4429
https://github.com/zkoss/zk/blob/v9.1.0/zk/src/org/zkoss/zk/ui/http/ZKWebSocket.java#L106
Workaround
add an empty or random connection_uuid parameter to websocket urls
/echo/?dtid=[desktop-id]&connection_uuid=
- relates to
-
ZK-4429 websockets not working on Glassfish (5)
- Closed