dropwizard-websockets没有这样的方法错误

时间:2016-12-21 12:59:07

标签: java websocket guice dropwizard

我正在尝试使用dropwizard-websockets v1.2与dropwizard 1.0.3,但得到以下错误。 dropwizard-guice阻碍了吗?

web_1       | WARN  [2016-12-21 12:50:53,665] org.eclipse.jetty.servlet.ServletHandler:
web_1       | ! java.lang.NoSuchMethodError: org.eclipse.jetty.io.AbstractConnection.<init>(Lorg/eclipse/jetty/io/EndPoint;Ljava/util/concurrent/Executor;Z)V
web_1       | ! at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.<init>(AbstractWebSocketConnection.java:225)
web_1       | ! at org.eclipse.jetty.websocket.server.WebSocketServerConnection.<init>(WebSocketServerConnection.java:41)
web_1       | ! at org.eclipse.jetty.websocket.server.WebSocketServerFactory.upgrade(WebSocketServerFactory.java:520)
web_1       | ! at org.eclipse.jetty.websocket.server.WebSocketServerFactory.acceptWebSocket(WebSocketServerFactory.java:186)
web_1       | ! at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:206)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1       | ! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:34)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1       | ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:50)
web_1       | ! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:44)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1       | ! at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)
web_1       | ! at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)
web_1       | ! at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)
web_1       | ! at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)
web_1       | ! at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1       | ! at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
web_1       | ! at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
web_1       | ! at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
web_1       | ! at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
web_1       | ! at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
web_1       | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
web_1       | ! at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
web_1       | ! at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
web_1       | ! at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
web_1       | ! at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
web_1       | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
web_1       | ! ... 26 common frames omitted
web_1       | ! Causing: javax.servlet.ServletException: Filtered request failed.
web_1       | ! at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:384)
web_1       | ! at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1676)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
web_1       | ! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1174)
web_1       | ! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
web_1       | ! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1106)
web_1       | ! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
web_1       | ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
web_1       | ! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240)
web_1       | ! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51)
web_1       | ! at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:459)
web_1       | ! at io.dropwizard.jetty.BiDiGzipHandler.handle(BiDiGzipHandler.java:68)
web_1       | ! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)
web_1       | ! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
web_1       | ! at org.eclipse.jetty.server.Server.handle(Server.java:524)
web_1       | ! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
web_1       | ! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
web_1       | ! at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
web_1       | ! at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
web_1       | ! at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
web_1       | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
web_1       | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
web_1       | ! at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
web_1       | ! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
web_1       | ! at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
web_1       | ! at java.lang.Thread.run(Thread.java:745)

1 个答案:

答案 0 :(得分:0)

Maven central拥有1.2版本的dropwizard-websockets,这个版本已经过时且已过时但比默认显示的更新版本更高。

版本1.0.0-1工作正常。