views:

221

answers:

2

I'm using IBM's build of Java with HttpClient and having little success. Whenever I use the HttpClient object's executeMethod(), I get a NoSuchAlgorithmException.

Dec 22, 2009 2:59:58 PM com.ibm.rcp.security.ssl.PlatformSSLProtocolSocketFactory createPlatformSSLContext()
WARNING: CWPST502W:  The algorithm for recovering the key from the keystore cannot be found.
Throwable occurred: java.security.NoSuchAlgorithmException: K00b3
 at javax.net.ssl.SSLContext.getInstance(SSLContext.java:57)
 at com.ibm.rcp.security.ssl.PlatformSSLProtocolSocketFactory.createPlatformSSLContext(PlatformSSLProtocolSocketFactory.java:47)
 at com.ibm.rcp.security.ssl.PlatformSSLProtocolSocketFactory.getSSLContext(PlatformSSLProtocolSocketFactory.java:69)
 at com.ibm.rcp.security.ssl.PlatformSSLProtocolSocketFactory.createSocket(PlatformSSLProtocolSocketFactory.java:96)
 at com.ibm.rcp.security.ssl.PlatformSSLProtocolSocketFactory.createSocket(PlatformSSLProtocolSocketFactory.java:109)
 at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
 at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
 at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:401)
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
...
+1  A: 

Not a direct answer but Jake Ochs has reported the same problem on the Eclipse Community Forums, on the eclipse.platform.rcp newsgroup, on the Lotus Expeditor Forum and in here on StackOverflow but didn't receive any feedback that could help to solve this (at least nothing publicly available). So, actually, the best answer may be the one from the Eclipse forums:

If you're building on top of Lotus XPD, I would use IBM's support channels for help. Especially when you see 'com.ibm.rcp*' in the stacktraces...

I guess this is not what you're expecting but this is IMHO a good advice as I'm not sure there is much public information available on the algorithm used and the library providing the algorithm implementation.

Pascal Thivent
+2  A: 

It seems like you're trying to use HTTPS and you need extra work to have the cryptographic extension working.

The http client unlike a regular browser doesn't know very well how to use certificates, you probably have to add it your self in for it to work well.

Another possibility is you're trying to use a cryptographic provider not supported/installed in your client.

See also: SSL Guide on the HttpClient documentation.

OscarRyz