This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Security and the fly likes ValidatorException: PKIX path building failed: unable to find valid certificate path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "ValidatorException: PKIX path building failed: unable to find valid certificate path" Watch "ValidatorException: PKIX path building failed: unable to find valid certificate path" New topic
Author

ValidatorException: PKIX path building failed: unable to find valid certificate path

Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
Hello;

I am getting an following exception while hitting on a HTTPS URL. The strange thing is some times this exception comes and some time it works just fine.

ValidatorException: PKIX path building failed: unable to find valid certification path to requested target

I am unable to understand why it is happening.
What thing on my end need to be managed for HTTPS communication to avoid this exception?

I am sharing my code with you people, if you can give me any idea about it.

Exception trace is:


And my java code is:



Tahir Akram
greg stark
Ranch Hand

Joined: Aug 10, 2006
Posts: 220
The connection works just fine for me.

The strange thing is some times this exception comes and some time it works just fine.


Sounds like a thread-safety issue, of which I do not have the talent to debug. All I can suggest is to check your code again for thread-safety issues.


Nice to meet you.
Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
Thanks greg stark for your reply.

But this is itself one thread which hits that URL. This request is not originating from a web server. I wonder if I understand your point well...
[ December 15, 2008: Message edited by: Tahir Akram ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ValidatorException: PKIX path building failed: unable to find valid certificate path