/
WebSphere - Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

WebSphere - Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

Problem

When using the SeaLights test listener as a javaagent in WebSphere, it fails to connect to our server with ClassNotFoundException for com.ibm.websphere.ssl.protocol.SSLSocketFactory

[SEALIGHTS] (...) Error: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:10) ...

Cause

This is a known issue with WebSphere when SSL is enabled and using a JDK from the WebSphere Application Server (see references below).

When the IBM WebSphere Application Server starts up it sets the security property to the WebSphere default of com.ibm.websphere.ssl.protocol.SSLSocketFactory but this class is not visible to the Java agent, thus the ClassNotFoundException is raised when trying to open a secured connection to Sealights' servers.

Solution

This issue can be resolved by creating a file called sl.java.security with the following content

ssl.SocketFactory.provider= ssl.ServerSocketFactory.provider=

And then add the following parameter to the JVM arguments of WebSphere alongside our javaagent: 

-Djava.security.properties=fullPathTo/sl.java.security

 

Another solution is to set WebSphere SSL configuration to use the IBM JSSE implementation by defining the content of sl.java.security file as below

 

References

Related articles







Related content

WebSphere - Error 404 (Page Not found) when enabling Sealights
WebSphere - Error 404 (Page Not found) when enabling Sealights
More like this
SeaLights Java agent - Command Reference
SeaLights Java agent - Command Reference
Read with this
Java - SSL connection issue with java 7 under version 131
Java - SSL connection issue with java 7 under version 131
More like this
Using Node.js Agent - Ignoring Files or Folders
Using Node.js Agent - Ignoring Files or Folders
Read with this
Java - Adding Certificate to the Java keystore
Java - Adding Certificate to the Java keystore
More like this
Downloading the java agent files
Downloading the java agent files
Read with this