hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guy Katz <gk...@allot.com>
Subject Fluent API
Date Mon, 13 Feb 2012 15:26:55 GMT
Hi;
I am having trouble executing a simple http request via fluent API.
This is the stack trace I get:
"Exception in thread "main" java.lang.ExceptionInInitializerError
      at org.apache.http.client.fluent.Request.execute(Request.java:145)
      at com.consult.waves.util.HTTPUtils.execRequest(HTTPUtils.java:37)
      at com.consult.waves.util.HTTPUtils.requestAsStream(HTTPUtils.java:20)
      at com.consult.waves.util.HTTPUtils.main(HTTPUtils.java:45)
Caused by: java.lang.IllegalStateException: Failure initializing default system SSL context
      at org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:371)
      at org.apache.http.conn.ssl.SSLSocketFactory.getSystemSocketFactory(SSLSocketFactory.java:204)
      at org.apache.http.impl.conn.SchemeRegistryFactory.createSystemDefault(SchemeRegistryFactory.java:82)
      at org.apache.http.client.fluent.Executor.<clinit>(Executor.java:59)
      ... 4 more
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect
      at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:771)
      at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
      at java.security.KeyStore.load(KeyStore.java:1185)
      at org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:304)
      at org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:369)
      ... 7 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
      at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:769)
      ... 11 more"

The URL I request has nothing to do with https so I am not sure why there is a SSL context
involved here. I am working with jdk 6. I have a JSSECACERTS file in the jre/lib/security/
(this is the only change I did to the VM).
Here's a code snippet:
String urll = "http://images.oneddl.eu/images/7264lperi1a5qhce4uoo.jpg";
                  Request req = Request.Get(url);
                  return req.version(HttpVersion.HTTP_1_1)
                    //.connectTimeout(HTTPUtils.timeout)
                    //.socketTimeout(HTTPUtils.timeout)
                    .execute().returnContent();
Any ideas?
Thanks in advance





##############################################################################################
This message is intended only for the designated recipient(s).It may contain confidential
or proprietary information.
If you are not the designated recipient, you may not review, copy or distribute this message.
If you have mistakenly received this message, please notify the sender by a reply e-mail and
delete this message. 
Thank you.
##############################################################################################

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message