I have two laptops running the same project on them. Both instances are configured to use Java JDK 6 (same minor version). However one machine is not able to connect to a remote REST service. By running applications with -Djavax.net.debug=all
option I came to the conclusion that the issue is with the ClientKeyExchange step as this step does not happen on the problematic laptop.
A post in the IBM developer community suggests that "hardware crypto device being used is not on the supported list". However I have no understanding about "hardware crypto devices".
What I can tell is that "enabled cipher suites", "excluded cipher suites", "cipher suites have been set to" lists printed by means of -Djavax.net.debug=all
are the same on both machines.
Using JDK cacerts.
Found the solution. Project is using JAX-RS so calls to external service happened through that framework and because of that I could not dig to the problem since there were no errors. So I tried different approach: tried to access the service by using simple
javax.net.ssl.HttpsURLConnection
which showed mejava.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
and therefore I changed mylocal_policy.jar
andUS_export_policy.jar
files (thanks to @Charlie Could not initialize class javax.crypto.SunJCE_b)I think I had changed policy jars on first laptop and forgot to do this on the new laptop.