Its an Urgent one : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

2 messages Options
Embed this post
Permalink
RRG

Its an Urgent one : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Reply Threaded More More options
Print post
Permalink
I have my application on a Tomcat server instance and my CAS is setup on another Tomcat instance.
I am getting a certificate exception like the below. I followed certain instructions suggested by CAS articles to make my Tomcat SSL enabled.

But, it did not help me to get rid of the below exception. Can any one pls. help me ASAP on this one, it is pretty urgent for me.

javax.servlet.ServletException: 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
        edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:254)
        edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)


root cause

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
        com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
        com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
        com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
        com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
        com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
        com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
        com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
        com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
        com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
        com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
        sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
        sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
        sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
        edu.yale.its.tp.cas.util.SecureURL.retrieve(SecureURL.java:70)
        edu.yale.its.tp.cas.client.ServiceTicketValidator.validate(ServiceTicketValidator.java:212)
        edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:219)
        edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)

RRG

More description of my Problem - Re: Its an Urgent one : sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Reply Threaded More More options
Print post
Permalink
Scenario is,
 
We want to use CAS for Single Signon in our project.
 
I am looking out for help at the earliest possible. Can anyone please help me in this regard?
 
I explored CAS and related stuff. And I have come up with the main steps like below.
 
1.     CAS Server setup on a dedicated Tomcat instance and I have made it SSL enabled.   - Done
 
2.     Two sample applications (two  .war files) deployed on the same Tomcat instance. This one also SSL enabled.  - Done
 
3.     Developed a sample Login page (not the default one by CAS) and a sample home page for each sample application.  - Done
 
4.     When I access the Home page of one of the 2 applications, before it displays the Home page, it redirects me to CAS and displays the custom Login page like I mentioned above.  - Done
 
5.     On click of Submit on the Login page, it suppose to display the Home page of the application that was accessed on Step 4.  - Problem due Security Certificate like I mentioned below.
 
It throws the exception like below (on Step 5),
 
javax.servlet.ServletException: 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
 edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:254)
 edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)

root cause
 
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
 com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
 com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
 com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
 com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
 com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
 com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
 com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
 sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
 sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
 sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
 edu.yale.its.tp.cas.util.SecureURL.retrieve(SecureURL.java:70)
 edu.yale.its.tp.cas.client.ServiceTicketValidator.validate(ServiceTicketValidator.java:212)
 edu.yale.its.tp.cas.client.filter.CASFilter.getAuthenticatedUser(CASFilter.java:219)
 edu.yale.its.tp.cas.client.filter.CASFilter.doFilter(CASFilter.java:184)