just include the httpclient jar in your classpath

bye
norman


Am Samstag, 21. Mai 2011 schrieb Michael <mtarullo...@optonline.net>:
> Where can I it?  Looked everywhere!
>
> -----Original Message-----
> From: Stan Lewis [mailto:sle...@fusesource.com]
> Sent: Saturday, May 21, 2011 8:25 AM
> To: users@activemq.apache.org
> Subject: Re: java.lang.NoClassDefFoundError: 
> org/apache/commons/httpclient/HttpMethod
>
> The HTTP transport classes are in the activemq-optional jar.
>
> On Fri, May 20, 2011 at 11:09 PM, Michael <mtarullo...@optonline.net> wrote:
>> I am trying to run a very simple ActiveMQ message producer client.
>> The source code is provided below.
>>
>>
>>
>> I am launching the app from Eclipse using the Run menu.  I have
>> configured a Run Configuration For the client app.  On the classpath
>> tab of the Run Configuration for the app I have included
>> activemq-all-5.5.0.jar,
>> slf4j-simple-1.5.11 and httpclient-4.1.1.jar.
>>
>>
>>
>> When I run the app I get the following stack trace provided below.
>> Can anyone tell me what might be wrong?
>>
>>
>>
>> Thank you.
>>
>>
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> org/apache/commons/httpclient/HttpMethod
>>
>>      at
>> org.apache.activemq.transport.http.HttpTransportFactory.createTranspor
>> t(Http
>> TransportFactory.java:75)
>>
>>      at
>> org.apache.activemq.transport.TransportFactory.doConnect(TransportFact
>> ory.ja
>> va:141)
>>
>>      at
>> org.apache.activemq.transport.TransportFactory.doConnect(TransportFact
>> ory.ja
>> va:51)
>>
>>      at
>> org.apache.activemq.transport.TransportFactory.connect(TransportFactor
>> y.java
>> :80)
>>
>>      at
>> org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQ
>> Connec
>> tionFactory.java:243)
>>
>>      at
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection
>> (Activ
>> eMQConnectionFactory.java:258)
>>
>>      at
>> org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection
>> (Activ
>> eMQConnectionFactory.java:230)
>>
>>      at
>> org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveM
>> QConne
>> ctionFactory.java:178)
>>
>>      at
>> JMSActiveMQPublisherApp.Execute(JMSActiveMQPublisherApp.java:39)
>>
>>      at JMSActiveMQPublisherApp.main(JMSActiveMQPublisherApp.java:28)
>>
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.commons.httpclient.HttpMethod
>>
>>      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
>>
>>
>>
>> import java.util.Vector;
>>
>>
>>
>> import javax.jms.Connection;
>>
>> import javax.jms.Session;
>>
>> import javax.jms.Destination;
>>
>> import javax.jms.DeliveryMode;
>>
>> import javax.jms.MessageProducer;
>>
>> import javax.jms.TextMessage;
>>
>>
>>
>> import org.apache.activemq.ActiveMQConnection;
>>
>> import org.apache.activemq.ActiveMQConnectionFactory;
>>
>>
>>
>> public class JMSActiveMQPublisherApp
>>
>> {
>>
>>    private String user         = ActiveMQConnection.DEFAULT_USER;
>>
>>    private String password     = ActiveMQConnection.DEFAULT_PASSWORD;
>>
>

Reply via email to