今天早上我有些热门话题。 我很自豪能够在swing客户端中添加一些websocket功能,以便使用tyrus-standalone-client 1.12版与服务器进行通信。 所有测试都成功运行。 昨天我发布了新版本的swing客户端。由于以下错误,我们的几个客户可能再次启动客户端:
Caused by: org.glassfish.tyrus.core.HandshakeException: Sec-WebSocket-Key returned from server does not match expected response.
at org.glassfish.tyrus.core.SecKey.validateServerKey(SecKey.java:139)
at org.glassfish.tyrus.core.Handshake.validateServerResponse(Handshake.java:187)
at org.glassfish.tyrus.client.TyrusClientEngine.processUpgradeResponse(TyrusClientEngine.java:516)
at org.glassfish.tyrus.client.TyrusClientEngine.handleSwitchProtocol(TyrusClientEngine.java:340)
at org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:277)
at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleHandshake(GrizzlyClientFilter.java:346)
at org.glassfish.tyrus.container.grizzly.client.GrizzlyClientFilter.handleRead(GrizzlyClientFilter.java:315)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
at java.lang.Thread.run(Unknown Source)
由于同一个客户端与我的其他客户成功运行,我无法确切地知道问题的原因。 我唯一的线索是java版本。遇到问题的客户使用的是java 1.8.0_71。我已经在java 1.8.0_73和1.8.0_45上测试过没有问题。
由于