You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Chris Robison <ch...@gmail.com> on 2012/05/04 19:47:17 UTC

Little help on Java HTTP client

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

Re: Little help on Java HTTP client

Posted by jaskirat singh <ja...@gmail.com>.
if you are passed that exception then you don't need any other jar for now.
Now, you need to post the new exception you are getting. The above email
thread does not mean anything for now :)

On Mon, May 7, 2012 at 11:01 AM, Chris Robison <ch...@gmail.com>wrote:

> And in response to you comment about including the HTTP core jar in the
> project, apparently it does not included the abstract class that was
> missing. I had to go download the Apache HTTP components in full to get
> that.
>
> On Mon, May 7, 2012 at 12:00 PM, Chris Robison <chrisdrobison@gmail.com
> >wrote:
>
> > I'm past that exception. The problem now is that my client is launching
> > and promptly crashing while accessing the xml libraries. Let me get the
> > exception for you and I'll post it.
> >
> > Chris
> >
> >
> > On Mon, May 7, 2012 at 10:18 AM, jaskirat singh <
> jaskiratbhatia@gmail.com>wrote:
> >
> >> Also check if the jar actually has this class
> >> > > org/apache/http/message/AbstractHttpMessage
> >>
> >> On Mon, May 7, 2012 at 9:17 AM, jaskirat singh <
> jaskiratbhatia@gmail.com
> >> >wrote:
> >>
> >> > Hi Chris
> >> > Are you running this project from eclipse? Can you attach your class
> >> path?
> >> > if you are in linux or mac env then check your process and see if the
> >> jar
> >> > is there in the java process path
> >> >
> >> > ps -ef | grep -i java
> >> >
> >> > The issue has to do with the missing jar and the classpath (if the
> >> > exception you sent is correct)
> >> >
> >> > Thanks
> >> > Jaskirat
> >> >
> >> > On Mon, May 7, 2012 at 6:46 AM, Chris Robison <
> chrisdrobison@gmail.com
> >> >wrote:
> >> >
> >> >> Yep, I tried that. The HTTP client for Java doesn't seem to work.
> >> >>
> >> >> Chris
> >> >>
> >> >> On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <
> >> jaskiratbhatia@gmail.com
> >> >> >wrote:
> >> >>
> >> >> > Hi Chris
> >> >> > Try adding http core jar, not sure if activemq ships this jar with
> >> it.
> >> >> If
> >> >> > not then try to download this from here
> >> >> >
> >> >>
> >>
> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
> >> >> >
> >> >> > Sent from my iPad
> >> >> >
> >> >> > On May 4, 2012, at 10:47 AM, Chris Robison <
> chrisdrobison@gmail.com>
> >> >> > 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
> >> >> >
> >> >>
> >> >
> >> >
> >>
> >
> >
>

Re: Little help on Java HTTP client

Posted by Chris Robison <ch...@gmail.com>.
And in response to you comment about including the HTTP core jar in the
project, apparently it does not included the abstract class that was
missing. I had to go download the Apache HTTP components in full to get
that.

On Mon, May 7, 2012 at 12:00 PM, Chris Robison <ch...@gmail.com>wrote:

> I'm past that exception. The problem now is that my client is launching
> and promptly crashing while accessing the xml libraries. Let me get the
> exception for you and I'll post it.
>
> Chris
>
>
> On Mon, May 7, 2012 at 10:18 AM, jaskirat singh <ja...@gmail.com>wrote:
>
>> Also check if the jar actually has this class
>> > > org/apache/http/message/AbstractHttpMessage
>>
>> On Mon, May 7, 2012 at 9:17 AM, jaskirat singh <jaskiratbhatia@gmail.com
>> >wrote:
>>
>> > Hi Chris
>> > Are you running this project from eclipse? Can you attach your class
>> path?
>> > if you are in linux or mac env then check your process and see if the
>> jar
>> > is there in the java process path
>> >
>> > ps -ef | grep -i java
>> >
>> > The issue has to do with the missing jar and the classpath (if the
>> > exception you sent is correct)
>> >
>> > Thanks
>> > Jaskirat
>> >
>> > On Mon, May 7, 2012 at 6:46 AM, Chris Robison <chrisdrobison@gmail.com
>> >wrote:
>> >
>> >> Yep, I tried that. The HTTP client for Java doesn't seem to work.
>> >>
>> >> Chris
>> >>
>> >> On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <
>> jaskiratbhatia@gmail.com
>> >> >wrote:
>> >>
>> >> > Hi Chris
>> >> > Try adding http core jar, not sure if activemq ships this jar with
>> it.
>> >> If
>> >> > not then try to download this from here
>> >> >
>> >>
>> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
>> >> >
>> >> > Sent from my iPad
>> >> >
>> >> > On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com>
>> >> > 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
>> >> >
>> >>
>> >
>> >
>>
>
>

Re: Little help on Java HTTP client

Posted by Chris Robison <ch...@gmail.com>.
I'm past that exception. The problem now is that my client is launching and
promptly crashing while accessing the xml libraries. Let me get the
exception for you and I'll post it.

Chris

On Mon, May 7, 2012 at 10:18 AM, jaskirat singh <ja...@gmail.com>wrote:

> Also check if the jar actually has this class
> > > org/apache/http/message/AbstractHttpMessage
>
> On Mon, May 7, 2012 at 9:17 AM, jaskirat singh <jaskiratbhatia@gmail.com
> >wrote:
>
> > Hi Chris
> > Are you running this project from eclipse? Can you attach your class
> path?
> > if you are in linux or mac env then check your process and see if the jar
> > is there in the java process path
> >
> > ps -ef | grep -i java
> >
> > The issue has to do with the missing jar and the classpath (if the
> > exception you sent is correct)
> >
> > Thanks
> > Jaskirat
> >
> > On Mon, May 7, 2012 at 6:46 AM, Chris Robison <chrisdrobison@gmail.com
> >wrote:
> >
> >> Yep, I tried that. The HTTP client for Java doesn't seem to work.
> >>
> >> Chris
> >>
> >> On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <
> jaskiratbhatia@gmail.com
> >> >wrote:
> >>
> >> > Hi Chris
> >> > Try adding http core jar, not sure if activemq ships this jar with it.
> >> If
> >> > not then try to download this from here
> >> >
> >>
> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
> >> >
> >> > Sent from my iPad
> >> >
> >> > On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com>
> >> > 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
> >> >
> >>
> >
> >
>

Re: Little help on Java HTTP client

Posted by jaskirat singh <ja...@gmail.com>.
Also check if the jar actually has this class
> > org/apache/http/message/AbstractHttpMessage

On Mon, May 7, 2012 at 9:17 AM, jaskirat singh <ja...@gmail.com>wrote:

> Hi Chris
> Are you running this project from eclipse? Can you attach your class path?
> if you are in linux or mac env then check your process and see if the jar
> is there in the java process path
>
> ps -ef | grep -i java
>
> The issue has to do with the missing jar and the classpath (if the
> exception you sent is correct)
>
> Thanks
> Jaskirat
>
> On Mon, May 7, 2012 at 6:46 AM, Chris Robison <ch...@gmail.com>wrote:
>
>> Yep, I tried that. The HTTP client for Java doesn't seem to work.
>>
>> Chris
>>
>> On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <jaskiratbhatia@gmail.com
>> >wrote:
>>
>> > Hi Chris
>> > Try adding http core jar, not sure if activemq ships this jar with it.
>> If
>> > not then try to download this from here
>> >
>> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
>> >
>> > Sent from my iPad
>> >
>> > On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com>
>> > 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
>> >
>>
>
>

Re: Little help on Java HTTP client

Posted by jaskirat singh <ja...@gmail.com>.
Hi Chris
Are you running this project from eclipse? Can you attach your class path?
if you are in linux or mac env then check your process and see if the jar
is there in the java process path

ps -ef | grep -i java

The issue has to do with the missing jar and the classpath (if the
exception you sent is correct)

Thanks
Jaskirat
On Mon, May 7, 2012 at 6:46 AM, Chris Robison <ch...@gmail.com>wrote:

> Yep, I tried that. The HTTP client for Java doesn't seem to work.
>
> Chris
>
> On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <jaskiratbhatia@gmail.com
> >wrote:
>
> > Hi Chris
> > Try adding http core jar, not sure if activemq ships this jar with it. If
> > not then try to download this from here
> >
> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
> >
> > Sent from my iPad
> >
> > On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com>
> > 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
> >
>

Re: Little help on Java HTTP client

Posted by Chris Robison <ch...@gmail.com>.
Yep, I tried that. The HTTP client for Java doesn't seem to work.

Chris

On Fri, May 4, 2012 at 7:17 PM, Jaskirat Bhatia <ja...@gmail.com>wrote:

> Hi Chris
> Try adding http core jar, not sure if activemq ships this jar with it. If
> not then try to download this from here
> http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html
>
> Sent from my iPad
>
> On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com>
> 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
>

Re: Little help on Java HTTP client

Posted by Jaskirat Bhatia <ja...@gmail.com>.
Hi Chris
Try adding http core jar, not sure if activemq ships this jar with it. If not then try to download this from here
http://findjar.com/class/org/apache/http/message/AbstractHttpMessage.html

Sent from my iPad

On May 4, 2012, at 10:47 AM, Chris Robison <ch...@gmail.com> 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

Re: Little help on Java HTTP client

Posted by Torsten Mielke <to...@fusesource.com>.
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