camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cgveld <j.h.veldho...@avisi.nl>
Subject Exception on typeconversion, but result is ok?
Date Fri, 05 Jun 2009 12:57:04 GMT

Hi,

I recently started using Camel. It seems to be very powerful and useful, but
also sometimes a bit complex.
Anyway... Most things work great, but I do have a question.
I get an Exception when I try to read a Document from a JmsMessage.

I'll first try to explain what I am doing:
1. I get a message on an activemq queue
2. I take the id from this message and put a xml file on the 'IN'
    (this happens in a processor)
    exchange.getIn().setBody(new File(filename));
3. I process the message, this processor tries to read the message as a
document
    Document document = exchange.getIn().getBody(Document.class);

This is where the following errors occur:
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type: class
org.apache.camel.component.jms.JmsMessage to the required type:
java.io.InputStream with value JmsMessage: ActiveMQTextMessage

4. I evaluate an xpath expression on the document
5. I remove the result from the expression from the document
6. I put the document on the IN of the exchange again.

Strangely enough it seems the xpath expression can be evaluated and even the
nodes are deleted from the document. Although I got an exception reading the
document?
How is this possible? And even more important, how can I solve this?

Can anybody help me?

Thanks,

Jeroen

P.S. I noticed there are no converters from JmsMessage to anything in the
list so I could understand if my code wouldn't work at all. But it seems to
work fine, except for the exception.
-- 
View this message in context: http://www.nabble.com/Exception-on-typeconversion%2C-but-result-is-ok--tp23887671p23887671.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message