【问题标题】:How to run Jetty with SPDY on JDK8?如何在 JDK8 上使用 SPDY 运行 Jetty?
【发布时间】:2014-05-01 18:42:37
【问题描述】:

有几天我们有 JDK8。我试图用 SPDY 服务器运行 Jetty。在 JDK8 中没有 NPN 支持,所以它以:

[qtp22068985-16-selector-ServerConnectorManager@12e7b0e/1] WARN
org.eclipse.jetty.io.SelectorManager - Exception while notifying connection SslConnection@e1448a{NEED_UNWRAP,eio=-1/-1,di=-1} ->
NPNServerConnection@382d40{IDLE}
java.lang.NoSuchMethodError:
sun.security.ssl.HandshakeHash.<init>(ZZLjava/util/Set;)V
    at sun.security.ssl.Handshaker.activate(Handshaker.java:493)

我在 CLASSPATH 上使用npn-boot-1.1.6.v20130911.jar 运行它,它适用于最新的 JDK7。

关于如何在 JDK8 上使用 SPDY 运行 Jetty 有什么解决方法吗?

【问题讨论】:

    标签: java jetty java-8 spdy


    【解决方案1】:

    我是 Jetty 中 NPN 的实现者。

    NPN 是通过修改 JDK 类来实现的,因为 JDK 中缺少 TLS 扩展 API。 NPN 版本严格匹配 documentation 中指定的 JDK 版本。

    对于 JDK 8,我们不打算支持 NPN。相反,我们将支持作为 NPN 后继者的 ALPN,并将 ALPN 实现也向后移植到 JDK 7。

    ALPN 的实现已经在一个分支中完成,但尚未集成到主 Jetty 构建中。

    你得耐心一点,我们需要完成一堆事情,并将 ALPN 集成到 Jetty master 中。完成后,我们将blog about。

    【讨论】:

    • 我在使用热点 jdk1.8u40 java.lang.NoSuchMethodError: sun.security.ssl.HandshakeHash.setCertificateVerifyAlg 时遇到异常。这仅适用于 OpenJDK 吗?
    • JDK 8 不支持 NPN,您必须使用 ALPN
    猜你喜欢
    • 2014-09-21
    • 2015-04-10
    • 2014-11-16
    • 2015-04-04
    • 2012-09-23
    • 1970-01-01
    • 2015-08-27
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多