Home  >  Forum  >  Spring
Post New Query

java.lang.ClassNotFoundException: org.apache.http.client.HttpClient



Asked on August 23, 2014
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
at com.concretepage.AsyncRequestDemo.main(AsyncRequestDemo.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more

I am running spring 4 application and using AsyncClientHttpRequestFactory, but getting run time error.  Need Solution.



Replied on August 23, 2014
Use
<dependency>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
          <version>4.0-alpha4</version>
        </dependency>

and check


Write Answer








©2019 concretepage.com | Privacy Policy | Contact Us