Forum Discussion

kamahade's avatar
kamahade
Regular Contributor
15 years ago

SSL KeyStore error message - Command line

Hi all,

I'm testing a webservice hosted on a server which authenticate via SSL certificate. I'm successful in importing the certificate, and running the tests via UI launcher.

Now, I'm trying to run SoapUI PRO in command line, I'm left with below error message only. Same testcase works fine with UI Launcher.Problem only appears if I choose command line launcher !!

Running soapUI TestRunner for [Trial]
directory: D:\Program Files\eviware\soapUI-Pro-3.5.1\bin
command: cmd.exe /C testrunner.bat -sReg_Pack -cTestCase1 -r -I D:\soap-ui-projects\Trial-soapui-project.xml
soapUI Pro 3.5.1 TestCase Runner
Configuring log4j from [D:\Program Files\eviware\soapUI-Pro-3.5.1\bin\soapui-log4j.xml]
10:37:30,856 INFO [SoapUI] Added [file:/D:/Program%20Files/eviware/soapUI-Pro-3.5.1/bin/ext/db2jcc.jar] to classpath
10:37:30,856 INFO [SoapUI] Added [file:/D:/Program%20Files/eviware/soapUI-Pro-3.5.1/bin/ext/db2jcc4.jar] to classpath
10:37:30,856 INFO [SoapUI] Added [file:/D:/Program%20Files/eviware/soapUI-Pro-3.5.1/bin/ext/db2jcc4_license_cisuz.jar] to classpath
10:37:30,856 INFO [SoapUI] Added [file:/D:/Program%20Files/eviware/soapUI-Pro-3.5.1/bin/ext/sqljdbc.jar] to classpath
10:37:31,122 INFO [DefaultSoapUICore] initialized soapui-settings from [D:\Documents and Settings\Administrator\soapui-settings.xml]
10:37:31,512 INFO [SoapUIProGroovyScriptEngineFactory] Setting Script Library to [D:\Program Files\eviware\soapUI-Pro-3.5.1\bin\scripts]
10:37:31,528 INFO [DefaultSoapUICore] Adding listeners from [D:\Program Files\eviware\soapUI-Pro-3.5.1\bin\listeners\demo-listeners.xml]
10:37:32,059 INFO [WsdlProject] Loaded project from [file:D:/soap-ui-projects/Trial-soapui-project.xml]
10:37:32,559 INFO [SoapUIProTestCaseRunner] Running soapUI tests in project [Trial]
10:37:32,559 INFO [SoapUIProTestCaseRunner] Running TestCase [TestCase1]
10:37:32,559 INFO [SoapUIProTestCaseRunner] Running soapUI testcase [TestCase1]
10:37:32,575 INFO [SoapUIProTestCaseRunner] running step [Create_MA_Text]
10:37:33,606 INFO [HttpClientSupport$Helper] Initializing KeyStore
10:37:33,638 ERROR [SoapUI] An error occured [Probably bad PKCS12 password: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded], see error log for details

org.apache.commons.ssl.ProbablyBadPasswordException: Probably bad PKCS12 password: java.io.IOException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded
at org.apache.commons.ssl.KeyStoreBuilder.tryJKS(KeyStoreBuilder.java:510)
at org.apache.commons.ssl.KeyStoreBuilder.parse(KeyStoreBuilder.java:392)
at org.apache.commons.ssl.KeyStoreBuilder.build(KeyStoreBuilder.java:112)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:179)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:170)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:160)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:64)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:114)
at org.apache.commons.ssl.KeyMaterial.<init>(KeyMaterial.java:89)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.initKeyMaterial(HttpClientSupport.java:163)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.initSSL(HttpClientSupport.java:120)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport$Helper.<init>(HttpClientSupport.java:65)
at com.eviware.soapui.impl.wsdl.support.http.HttpClientSupport.<clinit>(HttpClientSupport.java:47)
at com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:91)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:122)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.submitRequest(WsdlSubmit.java:75)
at com.eviware.soapui.impl.wsdl.WsdlRequest.submit(WsdlRequest.java:235)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.run(WsdlTestRequestStep.java:324)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:206)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:137)
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.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:81)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:586)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:489)
at com.eviware.soapui.SoapUIProTestCaseRunner.runTestCase(SourceFile:168)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:318)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:138)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:80)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:48)
10:37:33,888 INFO [SoapUIProTestCaseRunner] Assertion [SOAP Response] has status FAILED
10:37:33,888 ERROR [SoapUIProTestCaseRunner] ASSERTION FAILED -> error: Unexpected element: TAG_END
10:37:33,888 ERROR [SoapUIProTestCaseRunner] ASSERTION FAILED -> Unexpected element: TAG_END
10:37:33,888 INFO [SoapUIProTestCaseRunner] Assertion [Not SOAP Fault] has status VALID
10:37:33,888 ERROR [SoapUIProTestCaseRunner] Create_MA_Text failed, exporting to [D:\Program Files\eviware\soapUI-Pro-3.5.1\bin\RegPack-TestCase1-CreateMAText-0-FAILED.txt]
10:37:35,872 INFO [SoapUIProTestCaseRunner] Finished running soapUI testcase [TestCase1], time taken: 1303ms, status: FAILED
10:37:35,872 INFO [SoapUIProTestCaseRunner] TestCase [TestCase1] finished with status [FAILED] in 1303ms

SoapUI 3.5.1 TestCaseRunner Summary
-----------------------------
Time Taken: 3313ms
Total TestSuites: 0
Total TestCases: 1 (1 failed)
Total TestSteps: 1
Total Request Assertions: 2
Total Failed Assertions: 1
Total Exported Results: 1
  • kamahade's avatar
    kamahade
    Regular Contributor
    I found solution myself.. I should add HTTP headers ..and try it.
  • Kumarpsk's avatar
    Kumarpsk
    New Contributor
    Hi

    I have the same issue
    ERROR:org.apache.commons.ssl.ProbablyBadPasswordException: Probably bad PKCS12 password: java.io.IOException: failed to decrypt safe contents entry: java.lang.ArithmeticException: / by zero

    Can you please help if you already got the solution.

    Thanks