Reputation: 1812
I have the following codes that is deployed in a web application in WebLogic 12.2.1. It makes an HTTPS (two-way SSL) to an internal server.
System.setProperty("javax.net.ssl.keyStoreType", identityKeyStoreType);
System.setProperty("javax.net.ssl.keyStore", identityKeyStore);
System.setProperty("javax.net.ssl.keyStorePassword", identityKeyStorePassword);
System.setProperty("javax.net.ssl.trustStoreType", trustKeyStoreType);
System.setProperty("javax.net.ssl.trustStore", trustKeyStore);
System.setProperty("javax.net.ssl.trustStorePassword", trustKeyStorePassword);
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
public boolean verify(String hostName, SSLSession session) {
return true;
}
});
URL url = new URL(null, serviceURL, new sun.net.www.protocol.https.Handler());
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
...
The codes work fine. I would like to enable SSL debugging, so I added the following in the codes:
System.setProperty("weblogic.security.SSL.verbose", "true");
System.setProperty("ssl.debug", "true");
System.setProperty("javax.net.debug", "all");
For some reason, the debugging doesn't seem to be turned on as I can't see the debugging logs in any of the WebLogic log files. What could be the problem?
Do note that System.out.println() and System.err.println() statements will both print to the server's log file. This means that my standard out and standard error have already been configured properly.
Thanks in advance.
Upvotes: 1
Views: 9474
Reputation: 1029
Try to set the standard out debug:
-Dweblogic.StdoutDebugEnabled=true
or in your case:
System.setProperty("weblogic.StdoutDebugEnabled", "true");
And you can also check the settings in the server console (something like host:port/console):
Server -> [Servername] -> Logging. At the bottom (you might have to expand the menu) are log filter settings. The Standard Log only logs messages with a severity greater than INFO
Final Answer (copied from my own comment):
Set the SSL Debug Statements as Start Parameter of Weblogic instead, it appears as if setting them during runtime does not work. But it should work if you set them as -D Paramter in the startWeblogic.cmd or startWeblogic.sh File
Upvotes: 2