马文:
<!-- Grizzly -->
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-websockets</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-comet</artifactId>
<version>2.3.1</version>
</dependency>
尽管它们都是相同的版本,但我在这些库中遇到了异常。当我更改版本号时,我只会得到与没有方法和东西的类相关的各种其他错误。我的日志显示 URL 已正确映射到套接字。当浏览器打开套接字连接时会发生此异常。
我正在尝试[portal-java][1]
与 Atmosphere 模块一起使用。
WARNING: Exception during FilterChain execution
java.lang.NoSuchMethodError: org.glassfish.grizzly.http.server.Response.initialize(Lorg/glassfish/grizzly/http/server/Request;Lorg/glassfish/grizzly/http/HttpResponsePacket;Lorg/glassfish/grizzly/filterchain/FilterChainContext;Lorg/glassfish/grizzly/utils/DelayedExecutor$DelayQueue;Lorg/glassfish/grizzly/http/server/HttpServerFilter;)Lorg/glassfish/grizzly/http/server/SuspendStatus;
at org.atmosphere.container.Grizzly2WebSocketSupport$Grizzly2WebSocketApplication$G2WebSocket.<init>(Grizzly2WebSocketSupport.java:225)
at org.atmosphere.container.Grizzly2WebSocketSupport$Grizzly2WebSocketApplication.createSocket(Grizzly2WebSocketSupport.java:129)
at org.glassfish.grizzly.websockets.WebSocketEngine.upgrade(WebSocketEngine.java:213)
at org.glassfish.grizzly.websockets.WebSocketEngine.upgrade(WebSocketEngine.java:187)
at org.glassfish.grizzly.websockets.WebSocketFilter.doServerUpgrade(WebSocketFilter.java:336)
at org.glassfish.grizzly.websockets.WebSocketFilter.handleServerHandshake(WebSocketFilter.java:319)
at org.glassfish.grizzly.websockets.WebSocketFilter.handleHandshake(WebSocketFilter.java:278)
at org.glassfish.grizzly.websockets.WebSocketFilter.handleRead(WebSocketFilter.java:199)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:103)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:409)
at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:378)
at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:342)
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:274)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:722)