的Maven:
<!-- 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)
答案 0 :(得分:1)
已向大气层人员提交更改以支持Grizzly 2.3。这些变化尚未公布。
我建议您跟进他们的邮件列表,以确定哪些快照发布有更改以及下一个版本何时发布。
答案 1 :(得分:0)
我最终需要获取他们的快照......
<repositories>
<!-- Added to get the Atmosphere 1.1.0-SNAPSHOT, can be removed when 1.1.0 is released -->
<repository>
<id>oss.sonatype.org-snapshot</id>
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>1.1.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>