You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bharathi_camel_learn <bh...@cognizant.com> on 2012/07/05 15:01:58 UTC

NoTypeConversionAvailableException

Hi all,

i am getting below exception when i receive a message from external ActiveMQ
broker.

/org.apache.camel.RuntimeCamelException:
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type: org.apa
che.activemq.command.ActiveMQStreamMessage to the required type:
org.w3c.dom.Document with value ActiveMQStreamMessage {commandId = 35,
responseRequir
ed = false, messageId = ID:PC192354-55442-1341492299337-0:1:10:1:1,
originalDestination = null, originalTransactionId = null, producerId =
ID:PC192354
-55442-1341492299337-0:1:10:1, destination = queue://personnel.records,
transactionId = null, expiration = 0, timestamp = 1341492424777, arrival =
0,
brokerInTime = 1341492424777, brokerOutTime = 1341492426687, correlationId =
null, replyTo = null, persistent = false, type = null, priority = 4, grou
pID = null, groupSequence = 0, targetConsumerId = null, compressed = false,
userID = null, content = org.apache.activemq.util.ByteSequence@36bc0a, mar
shalledProperties = org.apache.activemq.util.ByteSequence@17360be,
dataStructure = null, redeliveryCounter = 0, size = 0, properties =
{MULE_SESSION=r
O0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAEWgAFdmFsaWRMAA1mbG93Q29uc3RydWN0dAAmTG9yZy9tdWxlL2FwaS9jb25zdHJ1Y3QvRmxvd0NvbnN
0cnVjdDtMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAD3NlY3VyaXR5Q29udGV4dHQAJ0xvcmcvbXVsZS9hcGkvc2VjdXJpdHkvU2VjdXJpdHlDb250ZXh0O3hwAXB0ACQ4NWZiNjQwZi1jNjlmL
TExZTEtODM5ZC1hMzBlNGFkYzgxMGNwc3IAJWphdmEudXRpbC5Db2xsZWN0aW9ucyRTeW5jaHJvbml6ZWRNYXAbc/kJS0s5ewMAAkwAAW10AA9MamF2YS91dGlsL01hcDtMAAVtdXRleHQAEkxqYXZ
hL2xhbmcvT2JqZWN0O3hwc3IAJG9yZy5tdWxlLnV0aWwuQ2FzZUluc2Vuc2l0aXZlSGFzaE1hcJ3R2e9nRc4AAwAAeHB3DD9AAAAAAAAQAAAAAHhxAH4ACXh4,
fileSize=155, directory=D:\
Mule\input, MULE_ENCODING=UTF-8,
MULE_ROOT_MESSAGE_ID=85fb640d-c69f-11e1-839d-a30e4adc810c,
filename=message1.xml, originalFilename=message1.xml, MULE
_ENDPOINT=jms://activemq:personnel.records}, readOnlyProperties = true,
readOnlyBody = true, droppable = false} ActiveMQStreamMessage{ bytesOut =
null/

This is my camel-context.xml file.

pls help me to fix this.
http://camel.465427.n5.nabble.com/file/n5715545/camel-context.xml
camel-context.xml 

--
View this message in context: http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5715545.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: NoTypeConversionAvailableException

Posted by Christian Müller <ch...@gmail.com>.
The Camel team already provides many examples [1] and tutorials [2] for
free.
The simple unit test [3] shows how to write a route which sends to an
ActiveMQ queue and also consumes from this queue. And in this package, you
can find many more camel-jms tests...

Any by the way, it's transparent for Camel whether the broker runs embedded
or as a standalone (external) broker.

[1] http://camel.apache.org/examples.html
[2] http://camel.apache.org/tutorials.html
[3]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java

Best,
Christian

On Fri, Jul 6, 2012 at 5:50 AM, bharathi_camel_learn <
bharathi.s4@cognizant.com> wrote:

> Hi ,
>
> Thanks for your help.
>
> I can able to see the size of the queue.
>
> This is my requirement, i am sending a message to external ActiveMQ broker.
> I wand to receive the same message from my camel code.
>
> Please send the sample code for this.
>
> Thanks in advance.
>
> Regards,
> Bharathi S.
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5715545p5715586.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: NoTypeConversionAvailableException

Posted by bharathi_camel_learn <bh...@cognizant.com>.
Hi ,

Thanks for your help.

I can able to see the size of the queue. 

This is my requirement, i am sending a message to external ActiveMQ broker.
I wand to receive the same message from my camel code.

Please send the sample code for this.

Thanks in advance.

Regards,
Bharathi S.

--
View this message in context: http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5715545p5715586.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: NoTypeConversionAvailableException

Posted by Christian Müller <ch...@gmail.com>.
Looks like the message was empty:
size = 0
bytesOut =null/

What should the content be?

Best,
Christian

On Thu, Jul 5, 2012 at 3:01 PM, bharathi_camel_learn <
bharathi.s4@cognizant.com> wrote:

> Hi all,
>
> i am getting below exception when i receive a message from external
> ActiveMQ
> broker.
>
> /org.apache.camel.RuntimeCamelException:
> org.apache.camel.NoTypeConversionAvailableException: No type converter
> available to convert from type: org.apa
> che.activemq.command.ActiveMQStreamMessage to the required type:
> org.w3c.dom.Document with value ActiveMQStreamMessage {commandId = 35,
> responseRequir
> ed = false, messageId = ID:PC192354-55442-1341492299337-0:1:10:1:1,
> originalDestination = null, originalTransactionId = null, producerId =
> ID:PC192354
> -55442-1341492299337-0:1:10:1, destination = queue://personnel.records,
> transactionId = null, expiration = 0, timestamp = 1341492424777, arrival =
> 0,
> brokerInTime = 1341492424777, brokerOutTime = 1341492426687, correlationId
> =
> null, replyTo = null, persistent = false, type = null, priority = 4, grou
> pID = null, groupSequence = 0, targetConsumerId = null, compressed = false,
> userID = null, content = org.apache.activemq.util.ByteSequence@36bc0a, mar
> shalledProperties = org.apache.activemq.util.ByteSequence@17360be,
> dataStructure = null, redeliveryCounter = 0, size = 0, properties =
> {MULE_SESSION=r
>
> O0ABXNyACNvcmcubXVsZS5zZXNzaW9uLkRlZmF1bHRNdWxlU2Vzc2lvbi7rdtEW7GGKAwAEWgAFdmFsaWRMAA1mbG93Q29uc3RydWN0dAAmTG9yZy9tdWxlL2FwaS9jb25zdHJ1Y3QvRmxvd0NvbnN
>
> 0cnVjdDtMAAJpZHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAD3NlY3VyaXR5Q29udGV4dHQAJ0xvcmcvbXVsZS9hcGkvc2VjdXJpdHkvU2VjdXJpdHlDb250ZXh0O3hwAXB0ACQ4NWZiNjQwZi1jNjlmL
>
> TExZTEtODM5ZC1hMzBlNGFkYzgxMGNwc3IAJWphdmEudXRpbC5Db2xsZWN0aW9ucyRTeW5jaHJvbml6ZWRNYXAbc/kJS0s5ewMAAkwAAW10AA9MamF2YS91dGlsL01hcDtMAAVtdXRleHQAEkxqYXZ
>
> hL2xhbmcvT2JqZWN0O3hwc3IAJG9yZy5tdWxlLnV0aWwuQ2FzZUluc2Vuc2l0aXZlSGFzaE1hcJ3R2e9nRc4AAwAAeHB3DD9AAAAAAAAQAAAAAHhxAH4ACXh4,
> fileSize=155, directory=D:\
> Mule\input, MULE_ENCODING=UTF-8,
> MULE_ROOT_MESSAGE_ID=85fb640d-c69f-11e1-839d-a30e4adc810c,
> filename=message1.xml, originalFilename=message1.xml, MULE
> _ENDPOINT=jms://activemq:personnel.records}, readOnlyProperties = true,
> readOnlyBody = true, droppable = false} ActiveMQStreamMessage{ bytesOut =
> null/
>
> This is my camel-context.xml file.
>
> pls help me to fix this.
> http://camel.465427.n5.nabble.com/file/n5715545/camel-context.xml
> camel-context.xml
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/NoTypeConversionAvailableException-tp5715545.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>