webpro2 / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

Null pointer exception when sending message: server on linux environment #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If I use this code on a Mac, it works fine. But, if my server is running on a 
linux environment, it throws a null pointer exception the first time I try to 
send the message:
java.lang.NullPointerException
    at javapns.back.PushNotificationManager.sendNotification(Unknown Source)

After I get this exception, if I try to send a message again, I get the 
following error:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: 
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter 
must be non-empty
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1574)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1557)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1483)
    at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:83)
    at java.io.OutputStream.write(OutputStream.java:75)
    at javapns.back.PushNotificationManager.sendNotification(Unknown Source)

Any pointers? Do I need to convert the certificate from the P12 format to some 
other format in linux?

Thanks,
Gautam 

Original issue reported on code.google.com by gauta...@gmail.com on 29 Sep 2010 at 9:49

GoogleCodeExporter commented 9 years ago
I have not had an issue with the cert on linux or mac.

Are you running the latest apns lib? The old one required the apple cert to be 
pre-installed. The new lib will handle that for you.

Original comment by idbill.p...@gmail.com on 5 Oct 2010 at 4:54

GoogleCodeExporter commented 9 years ago
Old issue with no recent update, which is most likely fixed by all the 
reliability improvements of latest versions.  Please feel free to re-open if 
the issue is still valid.

Original comment by sype...@gmail.com on 7 Sep 2011 at 1:07