Jump to content
Excelsior Forums

Recommended Posts

Am having this error:exception reading response: 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 Yet The project has no error when i run it in the development environment.

How Do I solve it?

Share this post


Link to post
Share on other sites

I am getting the same error which doesn't happen when I run the code from within Netbeans.

I am using Jet7.2 with Java SE6 update 24 installed under windows XP

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

at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)

at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)

at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)

at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

at java.net.HttpURLConnection.getResponseCode(Unknown Source)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)

at javax.swing.JEditorPane.getStream(Unknown Source)

at javax.swing.JEditorPane.getStream(Unknown Source)

at javax.swing.JEditorPane.setPage(Unknown Source)

at javax.swing.JEditorPane.setPage(Unknown Source)

Share this post


Link to post
Share on other sites

I found the solution (at least to my problem):

I used the following option

System.setProperty("javax.net.debug","all");

to debug what is happening and compare the output generated by running the program

using the sun JVM and then the JET test run (Step 2 of 7)

JET uses a version of cacerts which is stored in:

C:\jet7.2-pro\profile1.6.0_24\jre\lib\security

it is different from the one used by the sun java machine which is stored in:

C:\Program Files\Java\jdk1.6.0_24\jre\lib\security

by copying it to the JET profile directory, the software finally behaves as expected

I hope it works when it's compiled.

David

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×