Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Apr 23, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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

  • Changed state: WontFix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant