1

代码:

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

例外:

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

堆栈跟踪:

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)
4

1 回答 1

0

此错误是由于 apns 库要求证书具有密码。使用带有密码的新证书后,错误就停止了。

于 2014-09-17T21:23:05.133 回答