【问题标题】:Cometd Compatible with jetty 8.1.11Cometd 兼容 jetty 8.1.11
【发布时间】:2013-11-21 11:14:26
【问题描述】:

我目前正在使用 cometd 1.0.0 和 jetty 8.1.11 进行项目。

我遇到了以下异常: WARN:oejut.Timeout:EXCEPTION java.lang.NoSuchMethodError: org.eclipse.jetty.util.LazyList.removeFromArray([Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; at org.cometd.server.ClientImpl.removeSubscription(ClientImpl.java:495) at org.cometd.server.ChannelImpl.unsubscribe(ChannelImpl.java:339) at org.cometd.server.ClientImpl.unsubscribeAll(ClientImpl.java:527) at org.cometd.server.AbstractBayeux.removeClient(AbstractBayeux.java:526) at org.cometd.server.ClientImpl.remove(ClientImpl.java:370) at org.cometd.server.continuation.ContinuationClient.remove(ContinuationClient.java:220) at org.cometd.server.continuation.ContinuationClient$1.expired(ContinuationClient.java:60) at org.eclipse.jetty.util.thread.Timeout.tick(Timeout.java:140) at org.eclipse.jetty.util.thread.Timeout.tick(Timeout.java:153) at org.cometd.server.continuation.ContinuationBayeux$1.run(ContinuationBayeux.java:76) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)

当我将 cometd 更新到 1.1.5 版时,我再也看不到这个错误了。但我在码头的 cpu 使用率在负载测试中相当高。

谁能推荐一个与jetty 8.1.11兼容的稳定版cometd。

【问题讨论】:

    标签: java jetty comet cometd jetty-8


    【解决方案1】:

    CometD 1.x 不再维护; CometD 2.x 自 2010 年 7 月推出。

    我强烈建议您升级到 CometD 2.x(当前版本 2.7.0),它适用于每个 Jetty 8 版本,尽管我建议您使用最新的 Jetty 8,当前为 8.1.14.v20131031

    【讨论】:

    • 谢谢,我同意我应该升级到最新版本,但我现在想要一个临时解决方案,因为我计划升级到 jetty 9 和 cometd 3 并等待构建 cometd 3。跨度>
    【解决方案2】:

    查看 Maven Central 上的信息,似乎 Jetty8 首次被 cometd 本身使用首先出现在 the metadata for Cometd 2.7.0

    但是,它将版本 8.1.13.v20130916 列为它自己使用的版本,而不是版本 8.1.11。

    为了完整起见,这里是 the metadata for Cometd 2.6.0,注意它没有 jetty8 引用。

    【讨论】:

    • 谢谢,你的意思是我应该升级到 jetty 8.1.13.v20130916cometd 2.7.0,因为其他版本可能会导致兼容性问题?
    猜你喜欢
    • 2012-01-20
    • 1970-01-01
    • 1970-01-01
    • 2011-02-24
    • 1970-01-01
    • 2020-05-21
    • 2016-05-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多