This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes client error: unable to find valid certification path to requested target Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "client error: unable to find valid certification path to requested target" Watch "client error: unable to find valid certification path to requested target" New topic
Author

client error: unable to find valid certification path to requested target

Ravi Danum
Ranch Hand

Joined: Jan 13, 2009
Posts: 104
Hello,

I get the following error when trying to run a java client which accesses a web service installed in tomcat/axis.

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.

I ran: keytool -genkey -alias tomcat -keyalg RSA

on my client machine. I also ran the same exact command on the machine where Tomcat is running.

In my client code, I set the following System properties:

javax.net.ssl.trustStore=<location of my .keystore>
javax.net.ssl.trustStorePassword=changit
javax.net.ssl.keyStore=<location of my .keystore>
javax.net.ssl.keyStorePassword=changeit

What I want is client authentication via a certificate when accessing the web service on tomcat/axis.

In the tomcat server.xml file, what should I set the keystore and truststore attributes to?

Thanks so much in advance for your kind and informative responses.

-Ravi


 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: client error: unable to find valid certification path to requested target
 
Similar Threads
Connecting to a web service using https
Certificate added to keystore still getting Exception !
JBoss webservice & ssl
accessing web service over ssl
Tomcat axis2 web service with HTTPS