Forum Discussion

craigcanderson's avatar
craigcanderson
Contributor
15 years ago

javax.net.ssl.SSLHandshakeException using soapUI testcase

load UI Version: 1.0-beta2 (from 20100819 build)
JDK/JRE: 1.6.0_21

Description:
I'm attempting to use an existing soapUI test case (that works as expected when executed from within the soapUI application) within a loadUI "soapUI Runner" component. What I'm getting is a series of javax.net.ssl.SSLHandshakeException exceptions in the logssoapui-errors.log file (see below).

I've also included the contents of my loadUI.bat file that has been modified to use the 1.6.0_21 JDK's JRE.

I've also confirmed that the certificate associated with the target url is contained in JDK's JRE's ..\lib\security\cacerts file via a Java class that takes the url as an input parameter and then attempts to make the SSL handshake. Executing this class using the target url is indicating that the cert is contained in the cacert file (see below).

I'm attempting to evaluate this product before pitching it to my management to replace our current performance/load testing tools. The ability to use existing functional test cases (already in use as a nightly regression test) as part of a load testing scenario is very attractive, but it has to work (I know this is currently beta).

Please let me know if I need to make any clarifications on what I've indicated or if you need additional information.


C:\tools\loadUI-1.0-beta2\loadUI.bat
@echo off
cd /d %~dp0
echo %CD%
rem set JAVAWS=jre/bin/javaws
set JAVAWS=C:\Program Files\Java\jdk1.6.0_21\jre\bin\javaws

:START
rem ********* run loadui ***********
"%JAVAWS%" loadUI.jnlp



InstallCert Java Class
C:\QA\Projects\Workbench>java InstallCert xyzsmaq1.xyz.abc.alpha.com
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~1\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar;.
Loading KeyStore C:\Program Files\Java\jdk1.6.0_21\jre\lib\security\cacerts...
Opening connection to xyzsmaq1.xyz.abc.alpha.com:443...
Starting SSL handshake...

No errors, certificate is already trusted

Server sent 1 certificate(s):

1 Subject CN=qa.services.alpha.com, OU=Alpha, O=VanDelay Industries, L=Galt, ST=Texas, C=US
Issuer CN=VeriSign Class 3 Secure Server CA - G2, OU=Terms of use at https://www.verisign.com/rpa (c)09, OU=VeriSign Trust Network, O="VeriSign, Inc.", C=US
sha1 01 54 d2 88 6e 39 b9 8d 2c 67 d4 33 bc 33 9e bc 63 1a 32 6d
md5 3e 11 a3 63 5b 45 df 52 34 33 61 31 ff c0 0d af

Enter certificate to add to trusted keystore or 'q' to quit: [1]
q
KeyStore not changed

C:\QA\Projects\Workbench>


logssoapui-errors.log
2010-08-27 14:33:12,617 ERROR [WsdlSubmit] Exception in request: 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
2010-08-27 14:33:12,617 ERROR [errorlog] 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
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.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at com.eviware.soapui.impl.wsdl.submit.transports.http.support.methods.ExtendedPostMethod.writeRequest(ExtendedPostMethod.java:107)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:194)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:76)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:236)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:324)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:207)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent$SoapUITestCaseRunner.run(SoapUISamplerComponent.java:657)
at com.eviware.loadui.components.soapui.SoapUISamplerComponent.sample(SoapUISamplerComponent.java:542)
at com.eviware.loadui.impl.component.categories.RunnerBase.doSample(RunnerBase.java:399)
at com.eviware.loadui.impl.component.categories.RunnerBase.access$600(RunnerBase.java:64)
at com.eviware.loadui.impl.component.categories.RunnerBase$Worker.run(RunnerBase.java:679)
at com.eviware.loadui.util.dispatch.CustomThreadPoolExecutor$Worker.run(CustomThreadPoolExecutor.java:188)
at java.lang.Thread.run(Unknown Source)
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(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
... 33 more
.
.
.