【问题标题】:NoSuchMethodError exception on SSLSocketImpl.receivedChangeCipherSpec when using javapns in GAE在 GAE 中使用 javapns 时 SSLSocketImpl.receivedChangeCipherSpec 出现 NoSuchMethodError 异常
【发布时间】:2015-05-12 04:04:22
【问题描述】:

我将 javapns 与 Google App Engine 一起使用。直到今天早上,一切都运行良好。现在,它引发了这个异常:

java.lang.NoSuchMethodError: sun.security.ssl.SSLSocketImpl.receivedChangeCipherSpec()Z
    at sun.security.ssl.Handshaker.receivedChangeCipherSpec(Handshaker.java:356)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:347)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:837)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1026)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1324)
    at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:712)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
    at java.io.OutputStream.write(OutputStream.java:75)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:402)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
    at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:320)
    at javapns.Push.sendPayload(Push.java:177)
    at javapns.Push.payload(Push.java:149)

有什么想法吗?我在 JDK7u 中看到了缺少的方法,但我认为我正在使用 JDK7。不确定这是否相关。

【问题讨论】:

    标签: google-app-engine javapns


    【解决方案1】:

    我就这个问题联系了 Google 支持并得到了以下回复:

    这是一个已经解决的已知问题。

    他们没有透露根本原因。

    【讨论】:

      【解决方案2】:

      我在尝试使用 BigTable 客户端时遇到了同样的问题。这是由于 Google API 使用 HTTP2 和 TLS。用于支持 TLS 的 ALPN 库会在启动时修改字节码,并与您正在运行的 JRE/JDK 版本紧密耦合。检查http://www.eclipse.org/jetty/documentation/current/alpn-chapter.html 的“版本”表,将 ALPN 的特定版本与您的 JRE 相匹配,您应该会很好。

      【讨论】:

        猜你喜欢
        • 2012-01-05
        • 1970-01-01
        • 2014-10-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-14
        • 2014-02-18
        • 2017-01-13
        相关资源
        最近更新 更多