Hi Gert
I browsed through JMX but was not able to find out the problem.
It just has the message that I send, nothing else is there.

It has all the simpletypes set to java.lang.String.

It would be really helpful if you can help me out on this regards

Thanks and Regards
Nivi


On Tue, Feb 24, 2009 at 7:30 PM, Gert Vanthienen
<[email protected]>wrote:

> Nivi,
>
> Could you try browsing the queue through JMX?  The error message 'JMS
> Message is not a TextMessage' is fairly precise about what's going on, so
> perhaps there's a leftover message from another application or some other
> JMS message you aren't expecting?
>
> Regards,
>
> Gert
>
>
> Nivetha Shri wrote:
>
>> Hi Gert
>>
>> Thanks for your response. Am sending a jms TextMessage only. Have
>> given the code snippet that i use to send message. Let me know if
>> there are any concerns in this.
>>
>> Destination destination = session.createTopic("myTopic.input");
>> TextMessage inputMessage = session.createTextMessage();
>>
>> inputMessage.setText("<?xml version='1.0'
>>
>> encoding='UTF-8'?><device-request><device-type>D1</device-type><Param>myParam</Param></device-request>);
>>
>> MessageProducer producer = session.createProducer(destination);
>> producer.send(inputMessage);
>>
>> Thanks and Regards
>> Nivi
>>
>> On 2/23/09, Gert Vanthienen <[email protected]> wrote:
>>
>>
>>> Nivi,
>>>
>>> It looks like the JMS Message that is on the queue is not a
>>> TextMessage, but some other JMS Message type (e.g. a ByteMessage or
>>> and ObjectMessage).  How did you send the message to the queue?
>>>
>>> There are two ways to get this solved: either change the sending
>>> application to send a TextMessage or create your own ConsumerMarshaler
>>> implementation (just inherit from DefaultConsumerMarshaler) to convert
>>> the other JMS Message type into a Source for sending it though the
>>> NMR.
>>>
>>> Regards,
>>>
>>> Gert Vanthienen
>>> ------------------------
>>> Open Source SOA: http://fusesource.com
>>> Blog: http://gertvanthienen.blogspot.com/
>>>
>>>
>>>
>>> 2009/2/20 Nivetha Shri <[email protected]>:
>>>
>>>
>>>> Hi All
>>>>
>>>> Am getting the following exception when i send an xml message to a
>>>> output
>>>> queue using apache camel and servicemix.
>>>>
>>>> My xml is a valid one
>>>>
>>>> Here is the stack trace:
>>>>
>>>> WARN  - DefaultMessageListenerContainer - Execution of JMS message
>>>> listener
>>>> failed
>>>> javax.jms.JMSException: Error sending JBI exchange
>>>>      at
>>>>
>>>> org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:569)
>>>>      at
>>>>
>>>> org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint$1.onMessage(JmsConsumerEndpoint.java:446)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:506)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:463)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
>>>>      at
>>>>
>>>> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:868)
>>>>      at java.lang.Thread.run(Thread.java:595)
>>>> Caused by: java.lang.UnsupportedOperationException: JMS message is not a
>>>> TextMessage
>>>>      at
>>>>
>>>> org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.populateMessage(DefaultConsumerMarshaler.java:104)
>>>>      at
>>>>
>>>> org.apache.servicemix.jms.endpoints.DefaultConsumerMarshaler.createExchange(DefaultConsumerMarshaler.java:72)
>>>>      at
>>>>
>>>> org.apache.servicemix.jms.endpoints.AbstractConsumerEndpoint.onMessage(AbstractConsumerEndpoint.java:536)
>>>>      ... 9 more
>>>> WARN  - JbiBinding                     - Unable to convert message body
>>>> of
>>>> type class [Ljava.lang.String; into an XML Source
>>>>
>>>>
>>>> Any insight on this will be very helpful
>>>>
>>>>
>>>> RegardsNivi
>>>>
>>>>
>>>>
>>>
>>
>>
>
>

Reply via email to