spring-mvctomcatapple-push-notificationscentos6javapns

JavAPNS Runs Locally but not on Centos


Problem

I am experiencing a problem setting up Apple APNS on centos. I have my Apache tomcat deployed and working fine. Also I am using Javapns to send push messages.

My Push notifications are working fine on windows, (within eclipse and on Apache standalone). but once I deploy the application to the server(centos 6) I get the Error: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found

I am using a p12 certificate that works perfect on Windows as I said. but with no luck on Centos.

Environment:

Apache Tomcat with a Spring 4 deployed webapplication. running on centos 6. with Java 1.7.57. Using Javapns of course for initiating the Push notifications. And I think it is worthy to mention that my P12 certificate is placed inside the WEB-INF/certs/certificate.p12.

-I do not have a SSL certificate for my webserver.

My Questions:

I tried almost everything, posting this as I feel really stuck with this problem.

Thank you in advance.


Solution

  • Thank you muenzpraeger for your suggestion, but it was not the solution.

    I could solve this through the great post found on http://cloudfields.net/blog/ios-push-notifications-encryption/

    The problem as stated is related to authenticating the certificate to do communication over SSL. I had to command-line the Apple APNS certificate. and things worked like magic.

    I am happy though for what you have posted as it lead me to read more about keystores.

    Thank you for your help.