Notnoop/ java-apns 推送
我的 notnoop/java-apns 有问题。 它拒绝从我拥有的java服务器发送推送通知,并且我收到以下错误/异常:
com.notnoop.exceptions.NetworkIOException:javax.net.ssl.SSLException:java.lang.RuntimeException:意外错误::trustAnchors参数必须非空 在 com.notnoop.apns.internal.Utilities.wrapAndThrowAsRuntimeException(Utilities.java:268) 在 com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:173) 在 com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) 在 com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:52) 在 com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36) 在 com.kaniti.server.notification.impl.AppleIphoneNotificationJob.run(AppleIphoneNotificationJob.java:221) 在 java.lang.Thread.run(Thread.java:662) 引起原因:javax.net.ssl.SSLException:java.lang.RuntimeException:意外错误::trustAnchors 参数必须非空 在 com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) 在com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649) 在com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1612) 在 com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1595) 在 com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1521) 在 com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:64) 在 java.io.OutputStream.write(OutputStream.java:58) 在 com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:161)
我在不同的服务器上使用相同的代码、相同的推送证书,并且它可以工作,但在我的服务器上不行! 我似乎无法找出这个问题的原因。以前有人经历过吗?
I have a problem with the notnoop/java-apns.
It refuses to send a push notification form the java server i have and i get the following error/exception:
com.notnoop.exceptions.NetworkIOException: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: : the trustAnchors parameter must be non-empty
at com.notnoop.apns.internal.Utilities.wrapAndThrowAsRuntimeException(Utilities.java:268)
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:173)
at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:52)
at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
at com.kaniti.server.notification.impl.AppleIphoneNotificationJob.run(AppleIphoneNotificationJob.java:221)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: : the trustAnchors parameter must be non-empty
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1612)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1595)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1521)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:64)
at java.io.OutputStream.write(OutputStream.java:58)
at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:161)
I'm using the same code, the same push certificate on different servers, and it is working, but not on mine!
I cant seem to find out the cause of this problem. Has anyone experienced it before?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下步骤将帮助您解决问题。
步骤:
developer_identity.cer <= 从 Apple 下载
mykey.p12 <= 您的私钥
要遵循的命令:
我们需要的最终 p12 是 iphone_dev.p12 文件和密码。
使用它作为您的 p12。这确实是解决方案。 :)
The following steps will help you to sort your problem out.
Steps:
developer_identity.cer <= download from Apple
mykey.p12 <= Your private key
Commands to follow:
Final p12 that we will require is iphone_dev.p12 file and the passphrase.
Use this as your p12.This indeed is the solution. :)
您可以通过其他问题解决您的问题:trustAnchors 参数必须非空
您的问题是Java找不到证书存储,您可以更改存储的路径。
You may resolve your problem with this other question : the trustAnchors parameter must be non-empty
Your problem is that Java cannot find the cert store, you may change the path of the store.