Home  >  Forum  >  Spring
Post New Query

ClassNotFoundException: org.apache.http.nio.client.HttpAsyncClient


joined on
August 11,2014
Asked on August 23,2014
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/nio/client/HttpAsyncClient
at com.concretepage.AsyncRequestDemo.main(AsyncRequestDemo.java:17)
Caused by: java.lang.ClassNotFoundException: org.apache.http.nio.client.HttpAsyncClient
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.
joined on
December 28,2013
Replied on August 23,2014

You are missing below dependency.

        <dependency>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpasyncclient</artifactId>
          <version>4.0-beta4</version>
        </dependency>

Write Answer









Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us