SiKing

February 18, 2016

Another way to fix SSLHandshakeException in SoapUI

Filed under: automation,windows — SiKing @ 8:02 am
Tags:

Started testing a new API in SoapUI, and the very first thing I get is:

ERROR:Exception in request: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

So off I go, copy-paste the error into Google and see what comes up. There is a lot of advice about this issue here, here, here, none of which worked for me. Although this SO answer did lead me down the right path.

In the end, the problem was much more deluding.

Java comes with its own CA TrustStore. SoapUI, at least on Windows, comes with bundled Java, usually very outdated version of Java. From my past (Linux) experience I know that SoapUI is intelligent enough, that if it does not find the bundled Java it will look elsewhere ($PATH, $JAVA_HOME). So I went to my SoapUI install directory and renamed jre to jre.ignore. Of course I had previously installed the latest Java8. Restart SoapUI, and problem goes away.

I am not sure whom to blame for this WTF. Certainly part of the blame lies with Oracle lawyers for being dickheads (Java8 is not allowed to be pre-installed on any device), part lies with Microsoft for forcing their users to be ignorant retards, and part lies with SmartBear for following the crowd (the “every Java application must also install its own version of Java” crowd) like a sheep.

95 Comments »

  1. HI Team, Im using soapui 5.6.9 version and im getting below errro, I have done many workaround and it didnt worked anything for me.
    please request you all to help me to provide correct solution.

    2021-05-04 22:00:18 – Error getting response; javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

    Comment by gourav — May 4, 2021 @ 9:48 am | Reply

    • sorry version is soapui 5.6.0

      Comment by gourav — May 4, 2021 @ 9:50 am | Reply

    • This is a completely different error! It means your company security policy does secure packet inspection. Contact your IT and request to install the corporate certificate into your trust store.

      Comment by SiKing — December 29, 2023 @ 11:55 am | Reply

  2. thanks, upgrading from oracle java 1.8.0_45 to sap jvm 8.1.059 (sap machine https://sap.github.io/SapMachine/) and now sop ui works like a charm

    Comment by Otto Frost — December 12, 2020 @ 6:58 am | Reply

  3. Dude, it’s 2020 and this trick works like a charm!
    Your suggestion is the perfect workaround for bypassing SSL verification in soapUI.

    Having said that, people may want to switch to Postman 🙂

    Comment by codewarrior — October 2, 2020 @ 11:30 am | Reply

    • I am currently evaluating some alternatives to ReadyAPI – the paid version of SoapUI. I just got tired of every release having new bugs, without the old bugs getting fixed.
      Postman is one of the things I am looking at, however 1) JavaScript, really?, 2) Newman (to integrate Postman collecting into CI/CD), really?, and 3) a lot of my API tests need to talk to JDBC and JMS.
      Other alternatives: JMeter functional test mode, roll your own with REST-assured.

      Comment by SiKing — October 23, 2020 @ 3:11 pm | Reply

  4. bless you. just saved me. !!!

    Comment by Anonymous — September 24, 2020 @ 11:01 pm | Reply

  5. Thanks a lot.. it worked for me..

    Comment by Ashwin — May 26, 2020 @ 10:52 am | Reply

  6. It worked… Thanks !!

    Comment by ashwin — May 26, 2020 @ 10:47 am | Reply

  7. Thanks man !! It worked fine

    Comment by Renzo — February 25, 2019 @ 7:56 am | Reply

  8. Thanx-X Man you saved my work and life 🙂

    Comment by Anonymous — February 1, 2019 @ 2:54 am | Reply

  9. Hello, my sopaUI 5.4.0 used java version : 1.8.0_191 and I ignore the jre of soapUI but it doesn’t work with me beside I add this -Dsoapui.https.protocols=SSLv3,TLSv1.2 in sopaUI 5.4.0.wmoptions and
    this set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.https.protocols=”SSLv3,TLSv1.2″ in soapwui.bat but I get this error Exception in request: java.net.SocketException: Connection reset can you help please ?

    Comment by drissi — December 4, 2018 @ 6:28 am | Reply

    • Completely different error. Use your Google to find solution.

      Comment by SiKing — December 29, 2023 @ 11:57 am | Reply

  10. Thanks alot, worked fine

    Comment by Anonymous — November 30, 2018 @ 8:05 am | Reply

  11. Thanks buddy….worked now…appreciate it.

    Comment by Anonymous — October 29, 2018 @ 3:10 am | Reply

  12. awesome man…

    Comment by anthale — September 11, 2018 @ 4:54 am | Reply

  13. This worked for me as well, i was stuck for almost a week on this issue. Thanks a lot.

    Comment by Naresh — August 14, 2018 @ 1:10 am | Reply

  14. Thank you very much!. It really helped me

    Comment by Anonymous — August 10, 2018 @ 2:13 am | Reply

  15. Worked like magic Thanks lot!

    Comment by Anonymous — July 13, 2018 @ 12:56 am | Reply

  16. keep doing what you are doing. Appreciate it !

    Comment by Anonymous — July 11, 2018 @ 11:59 am | Reply

  17. Thankyou so much for this. I was stuck with this error for almost a week now. Cheers !

    Comment by patchywisdom — June 20, 2018 @ 2:58 am | Reply

  18. Thanks a ton !! Great job

    Comment by Vaishnavi Zawar — June 12, 2018 @ 4:25 am | Reply

  19. It worked . Many many Thanks!!

    Comment by Anonymous — June 4, 2018 @ 1:52 pm | Reply

  20. you are a savior man!! I usually do not post comments but YOU SAVED MY DAY !

    Comment by akash — June 1, 2018 @ 3:39 am | Reply

  21. I installed the java files from Install the java files from this link
    http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/jce-7-download-432124.html
    and replaced the files in the folder
    C:\Program Files\SmartBear\SoapUI-5.2.1\jre\lib\security

    I am using version 5.2.1

    Comment by Anonymous — April 20, 2018 @ 4:51 am | Reply

    • This Works, Thank You.

      Comment by Anonymous — December 13, 2018 @ 12:29 am | Reply

    • That’s probably overkill, and no way to go back, but I guess it works.

      Comment by SiKing — January 31, 2024 @ 1:01 pm | Reply

  22. Hi, I just hit a https request in my SOAP UI and got a successful response.
    I haven’t provided any certificate, nor have changed any settings.
    I am using soap 5.3.0

    Can someone tell me what could be the reason that it is not throwing any error?

    Comment by Palak — April 19, 2018 @ 3:33 am | Reply

    • The cert that is being used by the app you are talking to is a trusted one by your Java store and / or settings.

      Comment by SiKing — April 21, 2018 @ 11:56 am | Reply

  23. I have a folder named c:\program files\smartbear\soapui-5.4.0\jre. Do you mean rename the jre folder to jre.ignore? If I do that, and start SoapUI, I get a java.lang.unsupportedclassversionerror: com/eviware/soapui/SoapUI: unsupported major.minor version 52.0

    Comment by lefty61 — April 17, 2018 @ 11:52 am | Reply

    • You messed something up! When you restart SoapUI, did you see the message “INFO:Used java version: 1.8.0_xxx” (with the correct version) in the SoapUI log?

      Comment by SiKing — April 21, 2018 @ 11:53 am | Reply

    • not sure if you ever fixed this but just ran into this somewhere else – means your java version is wrong – it required 8 as skiKing said, you probably have 7 or something.

      Comment by Anonymous — November 27, 2018 @ 9:24 am | Reply

  24. This is really a awesome finding. I have been looking and fooling around all the changes. This is a simple change and easy one. Great it sovled the issue

    Comment by Abhijit Prusty — April 12, 2018 @ 10:41 am | Reply

  25. Awesome dude….Thanks a lot 🙂

    Comment by Akilesh — March 30, 2018 @ 12:12 am | Reply

  26. Thank you so much

    Comment by Anonymous — March 16, 2018 @ 3:12 am | Reply

  27. walah abibi.. thanks for the perfect solution!!

    Comment by Anonymous — March 5, 2018 @ 6:59 pm | Reply

  28. Thanks a lot. After struggling for two months, this worked for me.

    Comment by Shashi Ranjan — February 14, 2018 @ 10:38 pm | Reply

  29. Thank you! It worked for me.

    Comment by Anonymous — February 14, 2018 @ 12:10 pm | Reply

  30. Muchas gracias, esa solución ha resuelto mi problema. Thanks a lot, that solution has solved my problem.

    Comment by Anonymous — February 2, 2018 @ 3:28 am | Reply

  31. Thank you very much. This fixed my issue.

    Comment by Anonymous — February 1, 2018 @ 8:01 pm | Reply

  32. What a Legend!! I have been banging my head trying to resolve this and came across your post.. what a gem. resolved. Cheers.

    Comment by Anonymous — January 26, 2018 @ 9:29 am | Reply

  33. The only thing that eventually worked for me was to install and use the older version of SoapUI (5.3.0). In 5.4.0-EB I didn’t succeed and gave up 😦

    Comment by Adam — December 7, 2017 @ 7:14 am | Reply

  34. You DE MAN !!!!

    Comment by Anonymous — December 6, 2017 @ 8:08 am | Reply

  35. You are a one fantastic”o” dude

    Comment by Hasan — December 2, 2017 @ 6:34 pm | Reply

  36. Sorry to be the only one for whom it doesn’t work, but it doesn’t. I just reinstalled Windows 10 and downloaded SoapUI version 5.4.0-EB and the problem appeared (used 5.3.0 before and everything was ok). I installed most recent Java, renamed and then deleted the jre folder from soapui folder and i still get the Handshake exception. Not on every attempt, but on most. Now I REALLY have no idea where the problem is.

    Comment by Adam — November 30, 2017 @ 9:58 am | Reply

      1. If the issue is not consistent, then the problem could be somewhere else.
      2. Restart SoapUI, and try again. Make sure you see the message “INFO:Used java version: 1.8.0_144” (with the correct version) in the SoapUI log.
      3. Try the other links in the post.

      Comment by SiKing — December 1, 2017 @ 8:53 am | Reply

  37. Honestly…you’re a star Siking.

    Comment by Anonymous — November 30, 2017 @ 8:31 am | Reply

  38. Amazing solution that works!!!

    However now HermesJMS does not want to start from SoapUi window which used to work fine before. Where do I change the jre path that Hermes refers to? Checked hermes.bat but did not help me fix the problem

    Comment by Abhijith Madla — November 29, 2017 @ 8:09 pm | Reply

    • From HermesJMS homepage:

      Last Update: 2013-05-15

      Honestly I am surprised it still works at all!

      Comment by SiKing — November 30, 2017 @ 9:06 am | Reply

  39. Thanks so much! Solved my problem.

    Comment by beveradb — November 16, 2017 @ 2:03 am | Reply

  40. Awesome, thank you

    Comment by Anonymous — November 1, 2017 @ 11:37 am | Reply

  41. Really Awesome

    Comment by Ak — October 13, 2017 @ 6:37 am | Reply

  42. Thanks Man!

    Comment by Anonymous — October 13, 2017 @ 6:33 am | Reply

  43. Thanks a lot. Solved my problem.

    Comment by Anonymous — October 12, 2017 @ 11:07 am | Reply

  44. Thank you! Thank you! Thank you!

    Comment by Robert Paulsen — September 29, 2017 @ 2:10 pm | Reply

  45. Brilliant, been scratching my head and Googling for ages! Thanks 🙂

    Comment by Anonymous — September 29, 2017 @ 2:16 am | Reply

  46. thanks a lot , it really helped a lot 🙂 , can you please let us know how you got this solution ?

    Comment by sandeep — September 21, 2017 @ 12:39 am | Reply

  47. Worked like magic. Thanks!

    Comment by Anonymous — September 18, 2017 @ 5:33 am | Reply

  48. Thank you just ended 1 hour of feeling lost on internet.

    Comment by Anonymous — August 31, 2017 @ 12:04 am | Reply

  49. You are a genius. Even a novice non-technical person like me managed to get this working, very much thanks to your funny and insightful post. Just rename the directory and download java 8 and restart app and you should be golden. Thanks man.

    Comment by Anonymous — August 28, 2017 @ 1:36 pm | Reply

  50. Magic just happened. Thanks a ton for taking time and posting wonderful yet simple solution. If I meet you, I would like to give a treat to you 🙂

    Comment by Santosh — August 9, 2017 @ 2:03 am | Reply

  51. Worked for me too! Thank you for solid fix.

    Comment by Anonymous — August 7, 2017 @ 10:47 am | Reply

  52. Thanks a lot . It solved my issue . Great solution.

    Comment by Frank — August 7, 2017 @ 7:18 am | Reply

  53. Thank you very much for posting the solution.

    Comment by Anonymous — July 26, 2017 @ 7:38 am | Reply

  54. thanks it’s work for me

    Comment by yassine benaziz — July 6, 2017 @ 8:24 am | Reply

  55. Thank you… worked for me after days of struggling with it.

    Comment by Neetu — June 26, 2017 @ 11:19 pm | Reply

  56. Thanks dude – changing the jre to jre.ignore worked well for me.

    Comment by shamsu — June 5, 2017 @ 9:06 am | Reply

  57. I have 32-bit JRE installed in my machine and SOAP UI isn’t launching after renaming jre to jre.ignore. I have to use 32-bit for the application I am working on. Any suggestions?

    Comment by Chetan Chandrashekar — May 31, 2017 @ 2:42 pm | Reply

    • Install both 32b and 64b Java. To get SoapUI to pick up the 64b version, you have two options:

      1. Set JAVA_HOME to point to the 64b version.
      2. Edit soapui.(bat|sh) and hardwire the path in there.

      Comment by SiKing — May 31, 2017 @ 2:48 pm | Reply

  58. Perfect..thanks a ton..

    Comment by Anon — May 18, 2017 @ 10:07 pm | Reply

  59. perfect solution. you are a champ 🙂

    Comment by Anonymous — May 16, 2017 @ 1:18 pm | Reply

  60. Thanks..this option works really well..

    Comment by Anonymous — May 8, 2017 @ 6:47 am | Reply

  61. Thanks a lot

    Comment by Anonymous — May 3, 2017 @ 11:28 am | Reply

  62. I cannot thank you enough. I too went through several threads on the same issue, and you were the only one with the correct solution.

    Comment by Chris Gray — May 3, 2017 @ 8:41 am | Reply

  63. Awesome!! Solved the purpose

    Comment by Anonymous — April 26, 2017 @ 2:58 am | Reply

  64. That’s why you are The Champion. Worked great many thanks.

    Comment by Anonymous — April 24, 2017 @ 9:13 am | Reply

  65. Thank you So much! It worked 🙂

    Comment by Anonymous — April 16, 2017 @ 9:36 pm | Reply

  66. Thanks a Lot.

    Comment by Anonymous — March 22, 2017 @ 11:42 am | Reply

  67. Would have never figured this out on my own. The error doesn’t even infer a bad java config. Thanks!

    Comment by Anonymous — March 3, 2017 @ 2:32 pm | Reply

  68. Worked….so simple solution…thanks alot 🙂

    Comment by Anonymous — February 23, 2017 @ 10:57 am | Reply

  69. You are genius.I did not expect, this solution will work.

    Comment by Viplav — February 20, 2017 @ 2:05 am | Reply

  70. Genius! This fixed the issue I was having.

    Comment by Anonymous — February 13, 2017 @ 6:25 am | Reply

  71. Like a magic!

    Comment by Anonymous — February 2, 2017 @ 11:04 pm | Reply

  72. Thank you! Finally fixed the problem for me.

    Comment by Anonymous — December 13, 2016 @ 2:40 pm | Reply

  73. Best thing that happened to me today, spent a couple of hours checking out the other threads until I found yours. Thanks!

    Comment by Anonymous — November 24, 2016 @ 5:55 am | Reply

  74. This issue was wrecking my head for ages, thanks so much.

    Comment by Anonymous — November 11, 2016 @ 10:29 am | Reply

  75. Thank you! It works!

    Comment by Anonymous — November 8, 2016 @ 3:24 am | Reply

  76. Thank you !!!

    Comment by Anonymous — October 21, 2016 @ 8:21 am | Reply

  77. Thank you, saved my day!

    Comment by Anonymous — October 19, 2016 @ 11:32 pm | Reply

  78. Thanks God to take me here. I’m using JDK 8 and SOAP UI 5.2.1. None of the solutions worked. You saved me buddy. Have a nice weekend!

    Comment by Anonymous — September 30, 2016 @ 9:42 am | Reply

  79. God bless you bro!

    Comment by Anonymous — September 14, 2016 @ 6:15 am | Reply

  80. Thank you very much! It fixed my issue after days of struggling with it!

    Comment by Anonymous — August 10, 2016 @ 10:45 pm | Reply

  81. Thanks a lot, worked fine for me under windows 7 and JDK 8

    Comment by Anonymous — August 9, 2016 @ 7:30 am | Reply

  82. Thank you so much! Really appreciate you explaining this. Makes complete sense and I was able to fix my problem quickly.
    On OS-X, I renamed the folder /Applications/SoapUI-X.X.X.app/Contents/Plugins/jre.bundle to jre.ignore as you suggested.

    Comment by Anonymous — June 22, 2016 @ 2:23 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.