简体   繁体   English

是什么原因导致在使用notnoop的java-apns库时出现此错误?

[英]What is causing this error when using notnoop's java-apns library?

Code: 码:

<cfset LOCAL.APNSService =
 CreateObject(
 "java",
 "com.notnoop.apns.APNS"
 ).newService(
 ).withCert(
 "MyCert.p12",
 ""
 ).withSandboxDestination().build() />

Exception: 例外:

java.io.IOException: failed to decrypt safe contents entry:
       java.lang.ArithmeticException: / by zero 

Stack Trace: 堆栈跟踪:

com.notnoop.exceptions.InvalidSSLConfig: java.io.IOException: failed to decrypt safe contents entry: java.lang.ArithmeticException: / by zero
   at com.notnoop.apns.internal.Utilities.newSSLContext(Utilities.java:102)
   at com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:139)
   at com.notnoop.apns.ApnsServiceBuilder.withCert(ApnsServiceBuilder.java:114)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at coldfusion.runtime.StructBean.invoke(StructBean.java:511)
   at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)

This error was due to the fact that the apns lib requires the cert to have a password. 此错误是由于apns lib需要证书具有密码这一事实所致。 Once a new cert with a password was used, the error stopped. 一旦使用了带有密码的新证书,错误就会停止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM