views:

179

answers:

1

I am passing the following VM arguments to a WS client application that runs on Websphere 5.1.1 JRE, one on Windows XP and one on Linux but get different behaviors.

-Djavax.net.ssl.keyStore=./key.jks 
-Djavax.net.ssl.keyStorePassword=abc 
-Djavax.net.ssl.trustStore=./key.jks 
-Djavax.net.ssl.trust=abc 
-Djavax.net.ssl.trustStorePassword=abc 
-Djava.protocol.handler.pkgs=com.ibm.net.ssl.internal.www.protocol 
-Djavax.net.ssl.trustStoreType=JKS 
-DtraceSettingsFile=trace.log

On Windows all work fine, but on Linux I am getting an exception right where the WS client is supposed to open a connection:

java.net.SocketException: jks not found
    at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
    at com.ibm.ws.webservices.engine.components.net.JSSESocketFactory.create(JSSESocketFactory.java:207)
    at com.ibm.ws.webservices.engine.transport.http.HTTP11Sender$5.run(HTTP11Sender.java:1789)
    at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:111)
    at com.ibm.ws.webservices.engine.transport.http.HTTP11Sender$SocketPoolFactory.obtainSocket(HTTP11Sender.java:1781)
    at com.ibm.ws.webservices.engine.transport.http.HTTP11Sender.invoke(HTTP11Sender.java:185)
    at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:87)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:212)
    at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:255)

Am I missing something?

Thanks

Peter

A: 

That hard-coded string com.ibm.net.ssl.internal.www.protocol may be the cause of your problem if your Linux environment doesn't have the package installed. You might need to find a suitable entry for whatever libraries you do have deployed, or deploy the IBM lib.


Update: I found this here with reference to IBM VM versions which might help:

If you wish to use the HTTPS protocol handler, you must set the property java.protocol.handler.pkgs. In 1.3.x, the https protocol handler is: com.ibm.net.ssl.internal.www.protocol and in 1.4.x, the https protocol handler is: com.ibm.net.ssl.www.protocol. For example to set the HTTPS handler for 1.4.x:

Brabster
Right on. I've appended the ../jre/lib/ext directory to the ext.dirs list, and now works on Linux too. It seems that the WS client 'likes' ibmjsseprovider2.jar better then ibmjsseprovider.jarThanks. Appreciate
Peter