1751971 Members
4601 Online
108783 Solutions
New Discussion юеВ

Re: Java Error

 
Neng Vang
Occasional Contributor

Java Error

We are trying to build this new process that connects to a server but keep getting this java error. We think it might be a certification issue, but are not sure. Does anyone know what this, or the issue is that is causing this. BTW, we have other similar process like this one that are not having the same problems. Let me know if you need more info.

**** Exception 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 during login
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: 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
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: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(Alerts.java:150)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1476)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:847)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:815)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1025)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1038)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.verticalresponse.api._1_0.VRAPI.VRAPIBindingStub.login(VRAPIBindingStub.java:4085)
at com.bost.vr.VerticalResponseWrapper.login(VerticalResponseWrapper.java:113)
at com.bost.vr.VerticalResponseWrapper.getUnsubscribesAndBounces(VerticalResponseWrapper.java:64)
at com.bost.vr.VerticalResponseWrapper.getUnsubscribesAndBounces(VerticalResponseWrapper.java:45)
at com.bost.siebel.UnsubscribeProcessor.main(UnsubscribeProcessor.java:71)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
4 REPLIES 4
Ivan Krastev
Honored Contributor

Re: Java Error

Check your application for missing certificate - 'unable to find valid certification path to requested target during login'.


regards,
ivan
Neng Vang
Occasional Contributor

Re: Java Error

Ok. So, we import the certficate into the keytool cacert file. We've confirmed that it's present. Does anyone know if I need to point my script to use the key? I can't find any documents on how to do this.
Stephen Keane
Honored Contributor

Re: Java Error

login
New Member

Re: Java Error

please have the following static block in your client side of code
static
{
System.setProperty("javax.net.ssl.trustStore","path to your key store");
System.setProperty("javax.net.ssl.trustStorePassword","pwd for the key stoere");
}