Java Agent fails to connect to Contrast UI: java.lang.ClassNotFoundException

  • Updated


The Contrast Java Agent fails to connect to the Contrast Server and the following cause is seen in the agent log:

java.lang.ClassNotFoundException: Cannot find the specified class


When the IBM WebSphere Application Server starts up it looks to see whether the ssl.SocketFactory.provider property is defined in the <JRE_HOME>/lib/security/ file. (An example <JRE_HOME> is  /opt/IBM/WebSphere/AppServer/java/jre.) If the property is not defined then WebSphere assumes that it must configure the ssl.SocketFactory.provider and so sets the security property to the WebSphere default of

Unfortunately the class is not visible to the Java agent thus the ClassNotFoundException is raised when trying to connect to an SSL socket.


To address the issue, you will need to set the relevant properties to a null value therefore preventing WebSphere from loading its default providers.  To do so, add the following lines to the Java Security Policy:


This change can be applied in various locations depending on the desired scope.  See the first external reference below for the difference between the java.policy and server.policy files. Alternatively, you can localize the change by creating a text file, say, containing just those lines and reference it in the JVM System Properties using: 

External References

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request