publish(TextMessate) gives an exception.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

publish(TextMessate) gives an exception.

noviceforAMQ
Friends I am new to ActiveMQ development. I am trying to develop an application that needs to publish a message. Following is the code I have written TextMessage message = pubSession.createTextMessage( ); message.setText(text); publisher.publish(message); When I run the code it gives following exception: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/ jms/Destination; at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241) at org.apache.activemq.ActiveMQTopicPublisher.publish(ActiveMQTopicPublisher.java:123) at EM.writeMessage(EM.java:52) at EM.main(EM.java:66) Configuration: I am using Active MQ 5.3.0 JMS version: 1.1 J2EE version: 1.4 Application is a stand alone JMS application.
Reply | Threaded
Open this post in threaded view
|

Re: publish(TextMessate) gives an exception.

chirino
Class path looks messed up.  Could you give us a full listing of every
jar on it?

On Tue, Dec 15, 2009 at 4:50 AM, noviceforAMQ <[hidden email]> wrote:

>
> Friends I am new to ActiveMQ development. I am trying to develop an
> application in which I need to publish a message. Following is the code I
> have written
>
> TextMessage message = pubSession.createTextMessage( );
> message.setText(text);
> publisher.publish(message);
>
> While running the code it gives following exception:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/
> jms/Destination;
>        at
> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
>        at
> org.apache.activemq.ActiveMQTopicPublisher.publish(ActiveMQTopicPublisher.java:123)
>        at EM.writeMessage(EM.java:52)
>        at EM.main(EM.java:66)
>
> Configuration:
>
> I am using Active MQ 5.3.0
> JMS version: 1.1
> J2EE version: 1.4
>
> Application is a stand alone JMS application.
> --
> View this message in context: http://old.nabble.com/publish%28TextMessate%29-gives-an-exception.-tp26792194p26792194.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>



--
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/
Reply | Threaded
Open this post in threaded view
|

Re: publish(TextMessate) gives an exception.

noviceforAMQ

Hiram Chirino wrote
Class path looks messed up.  Could you give us a full listing of every
jar on it?

On Tue, Dec 15, 2009 at 4:50 AM, noviceforAMQ <abhishekvora@yahoo.com> wrote:
>
> Friends I am new to ActiveMQ development. I am trying to develop an
> application in which I need to publish a message. Following is the code I
> have written
>
> TextMessage message = pubSession.createTextMessage( );
> message.setText(text);
> publisher.publish(message);
>
> While running the code it gives following exception:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/
> jms/Destination;
>        at
> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
>        at
> org.apache.activemq.ActiveMQTopicPublisher.publish(ActiveMQTopicPublisher.java:123)
>        at EM.writeMessage(EM.java:52)
>        at EM.main(EM.java:66)
>
> Configuration:
>
> I am using Active MQ 5.3.0
> JMS version: 1.1
> J2EE version: 1.4
>
> Application is a stand alone JMS application.
> --
> View this message in context: http://old.nabble.com/publish%28TextMessate%29-gives-an-exception.-tp26792194p26792194.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>



--
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/

Thank you hiramchirino.

I have put following jar files in classpath environment variable:

jms.jar
j2ee.jar
activemq-core-5.3.0.jar
commons-logging-1.1.jar

I have also put jndi.properties in classpath.
Reply | Threaded
Open this post in threaded view
|

Re: publish(TextMessate) gives an exception.

chirino
So then your running the client from the command line?  If so please
just use the activemq-all-5.3.0.jar.. It will have all the
dependencies that a client needs.

Regards,
Hiram

On Tue, Dec 15, 2009 at 11:26 PM, noviceforAMQ <[hidden email]> wrote:

>
>
>
> Hiram Chirino wrote:
>>
>> Class path looks messed up.  Could you give us a full listing of every
>> jar on it?
>>
>> On Tue, Dec 15, 2009 at 4:50 AM, noviceforAMQ <[hidden email]>
>> wrote:
>>>
>>> Friends I am new to ActiveMQ development. I am trying to develop an
>>> application in which I need to publish a message. Following is the code I
>>> have written
>>>
>>> TextMessage message = pubSession.createTextMessage( );
>>> message.setText(text);
>>> publisher.publish(message);
>>>
>>> While running the code it gives following exception:
>>>
>>> Exception in thread "main" java.lang.NoSuchMethodError:
>>> org.apache.activemq.ActiveMQMessageProducerSupport.getDestination()Ljavax/
>>> jms/Destination;
>>>        at
>>> org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
>>>        at
>>> org.apache.activemq.ActiveMQTopicPublisher.publish(ActiveMQTopicPublisher.java:123)
>>>        at EM.writeMessage(EM.java:52)
>>>        at EM.main(EM.java:66)
>>>
>>> Configuration:
>>>
>>> I am using Active MQ 5.3.0
>>> JMS version: 1.1
>>> J2EE version: 1.4
>>>
>>> Application is a stand alone JMS application.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/publish%28TextMessate%29-gives-an-exception.-tp26792194p26792194.html
>>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Regards,
>> Hiram
>>
>> Blog: http://hiramchirino.com
>>
>> Open Source SOA
>> http://fusesource.com/
>>
>>
>
>
> Thank you hiramchirino.
>
> I have put following jar files in classpath environment variable:
>
> jms.jar
> j2ee.jar
> activemq-core-5.3.0.jar
> commons-logging-1.1.jar
>
> I have also put jndi.properties in classpath.
> --
> View this message in context: http://old.nabble.com/publish%28TextMessate%29-gives-an-exception.-tp26792194p26806142.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>



--
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/
Reply | Threaded
Open this post in threaded view
|

Re: publish(TextMessate) gives an exception.

noviceforAMQ

Hiram Chirino wrote
So then your running the client from the command line?  If so please
just use the activemq-all-5.3.0.jar.. It will have all the
dependencies that a client needs.

Regards,
Hiram
Yes I am running the client from command line.
I will put activemq-all-5.3.0.jar in classpath.
Thank you very much.