coosamatt / javapns

javapns
0 stars 0 forks source link

sun.security.validator.ValidatorException: PKIX path building failed (with production server) #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.change the host from gateway.sandbox.push.apple.com
to gateway.push.apple.com
2. Use the production certificate generated by apple

What is the expected output? What do you see instead?
A successor connection initialized but instead i am seeing 
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

What version of the product are you using? On what operating system?
Latest, on Linux

Please provide any additional information below.

Original issue reported on code.google.com by yanche...@gmail.com on 24 Feb 2011 at 4:24

GoogleCodeExporter commented 8 years ago
The error seems pretty clear. Verify that the files exist where the java app is 
expecting them.

What logging do you get when you use the flags indicated on the wiki page:
http://code.google.com/p/javapns/wiki/Tips

Original comment by idbill.p...@gmail.com on 27 Feb 2011 at 11:19

GoogleCodeExporter commented 8 years ago
The file is where it looks for it.  And I exported it to p12 correctly.  How do 
i check the logs?

Original comment by yanche...@gmail.com on 28 Feb 2011 at 10:06

GoogleCodeExporter commented 8 years ago
This is happening when i go to send the notification not when initializing. 

Original comment by yanche...@gmail.com on 28 Feb 2011 at 10:34

GoogleCodeExporter commented 8 years ago
"How do i check the logs?"

uh... You should do some research on implementing log4j, once that is worked 
out, go visit the link I mentioned earlier.

Original comment by idbill.p...@gmail.com on 28 Feb 2011 at 10:45

GoogleCodeExporter commented 8 years ago
yanchek99, were you able to get your code working with the production server?  
May we close this issue?

Original comment by sype...@gmail.com on 7 Sep 2011 at 3:44

GoogleCodeExporter commented 8 years ago

Original comment by sype...@gmail.com on 12 Sep 2011 at 3:02

GoogleCodeExporter commented 8 years ago
Issue suspected of being caused by invalid certificate chain for selected 
server.

Closing issue as no feedback was received since issue was reported.  
Please feel free to re-open if the issue is still valid.

Original comment by sype...@gmail.com on 14 Sep 2011 at 3:58

GoogleCodeExporter commented 8 years ago
i am getting same issue on my tomcat server..can we discuss this issue here...i 
had hard time to get resolve this..Thanks in advance

Original comment by 83.avin...@gmail.com on 13 Oct 2011 at 3:11

GoogleCodeExporter commented 8 years ago
This is an issue with the certificate chain which is either invalid, or is not 
built for the specific Apple service you are using (sandbox or production).  I 
strongly suggest you follow very precisely the procedure described in the 
"Preparing APNS certificates" wiki page on this site.

If you are still having an issue with this, please follow the troubleshooting 
steps provided in the "Troubleshooting" wiki page and copy-paste all results in 
this issue report so we can investigate further.

Original comment by sype...@gmail.com on 13 Oct 2011 at 8:32

GoogleCodeExporter commented 8 years ago
if i run this sample program from outside server from commandline lets say i 
get push notification on my iphone but when i run this programm from our server 
it is giving me exception.i'm using same certificate that means certificate 
doesn't seems any problem may be im missing any configuration. my server is 
tomcat.

Please advice.

Thanks.

Original comment by 83.avin...@gmail.com on 14 Oct 2011 at 5:28

GoogleCodeExporter commented 8 years ago
If you can push notifications successfully from the command line, but get an 
exception with the same keystore file from within Tomcat, maybe there is 
something wrong with the way the keystore file is read from Tomcat?  Could you 
post a complete stack trace of the exception you are getting, as well as the 
code you are using in Tomcat to push a notification?  Thank you!

Original comment by sype...@gmail.com on 14 Oct 2011 at 3:09

GoogleCodeExporter commented 8 years ago
exception file is attached...and code also..same code im calling in tomcat 
server..
Thanks

Original comment by 83.avin...@gmail.com on 14 Oct 2011 at 4:04

Attachments:

GoogleCodeExporter commented 8 years ago
You are using an old version of JavaPNS (1.6 I believe?).  Please make sure you 
use version 2.0, as tons of fixes have been made since 1.6...

Original comment by sype...@gmail.com on 14 Oct 2011 at 4:26

GoogleCodeExporter commented 8 years ago
Hi,
Thanks for replying..previously i was trying 2.0 beta version it didn't work 
for me then i switched back to 1.6 neither it does but now i tried 2.0 latest 
version and guess what...it is working like a charm..
Thanks a lot.

Original comment by 83.avin...@gmail.com on 17 Oct 2011 at 12:44

GoogleCodeExporter commented 8 years ago
Outstanding, thank you!

Original comment by sype...@gmail.com on 17 Oct 2011 at 1:42