activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: Little help on Java HTTP client
Date Mon, 21 May 2012 15:26:53 GMT
I checked my local maven repo and have this class in 
org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar

Try adding this dependency to your maven pom or reference the jar directly on your classpath.

Hope this helps.


Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com

On May 4, 2012, at 7:47 PM, Chris Robison wrote:

> I'm trying to get a java client connecting an AMQ server over HTTP, but the
> client keeps throwing the following exception:
> 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/http/message/AbstractHttpMessage
> at
> org.apache.activemq.transport.http.HttpTransportFactory.createTransport(HttpTransportFactory.java:72)
> at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:141)
> at
> org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:51)
> at
> org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:80)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:267)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:239)
> at
> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
> at ResponderProgram.run(ResponderProgram.java:34)
> at ResponderProgram.main(ResponderProgram.java:58)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.http.message.AbstractHttpMessage
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 10 more
> 
> I'm referencing every jar library I can. Any thoughts?
> 
> Chris





Mime
View raw message