java-apns is a Java client for Apple’s Push Notification Service (APNS). The library aims to provide a highly scalable interface to the Apple server, while still being simple and modular.
The interface aims to require very minimal code to achieve the most common cases, but have it be reconfigurable so you can even use your own networking connections or JSON library if necessary.
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
This is a known issue. The work around is to mark the public certificates as trusted by Java. The Downloads page contains
jssecacerts file, that can be placed in
jssecacerts is a keystore that contains the public certificate of Apple Feedback sandbox and production servers.
% wget http://code.google.com/p/java-use-examples/source/browse/trunk/src/com/aw/ad/util/InstallCert.java % javac InstallCert.java % java InstallCert feedback.sandbox.push.apple.com:2196 # [ ... press 1 when asked to ...] % java InstallCert feedback.push.apple.com:2196 # [ ... press 1 when asked to ...] % cp jssecacerts $JAVA_HOME/lib/security