Quantcast

calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

Ashish Kulkarni-2
Hello

I have an web application which i am running in tomcat in eclipse, this web
application calls a Web Service to get data, recently we moved these Web
services to use HTTPS, but when i try to call this HTTPS URL from web
service i get following error

I have created a key store, added it to tomcat and then added this
certificate to this key store in tomcat, but it is not working

Any ideas, about how can i get this certificate imported in tomcat, or do i
have to import it in java, how do i do it

Caused by: sun.security.validator.ValidatorException: PKIX path building
failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
at
sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
at sun.security.validator.Validator.validate(Validator.java:203)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
at
com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
... 68 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target
at
sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)


--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

Ashish Kulkarni-2
Hi
It worked, i added following lines in tomcat configuration

-Djavax.net.ssl.trustStore=C://mypath_to_keystore/keys.jks


Ashish


On Fri, Sep 9, 2011 at 3:25 PM, Ashish Kulkarni <[hidden email]
> wrote:

> Hello
>
> I have an web application which i am running in tomcat in eclipse, this web
> application calls a Web Service to get data, recently we moved these Web
> services to use HTTPS, but when i try to call this HTTPS URL from web
> service i get following error
>
> I have created a key store, added it to tomcat and then added this
> certificate to this key store in tomcat, but it is not working
>
> Any ideas, about how can i get this certificate imported in tomcat, or do i
> have to import it in java, how do i do it
>
> Caused by: sun.security.validator.ValidatorException: PKIX path building
> failed: sun.security.provider.certpath.SunCertPathBuilderException: unable
> to find valid certification path to requested target
>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
> at
> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
>  at sun.security.validator.Validator.validate(Validator.java:203)
> at
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
>  at
> com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
> at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
>  ... 68 more
> Caused by: sun.security.provider.certpath.SunCertPathBuilderException:
> unable to find valid certification path to requested target
>  at
> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
> at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
>  at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
>
>
> --
> Ashish
> www.ayurwellness.com
> www.mysoftwareneeds.com
>



--
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: calling HTTPS URL from tomcat in eclipse fails with unable to find valid certification path to requested target Error

hlopezvg
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Dear Ashish Excellent, worked for me just great, I opened the tomcat variables site in eclipse, and added what you post as a solution Thanks in advanced Hernan
Loading...