Hi,

I try to read messages published in a topic of ActiveMq -->
ActiveMQ.Advisory.* but get a type error converter has the body is null

        <camel:route>
            <camel:from    uri="activemq:topic:ActiveMQ.Advisory.*" />
            <camel:convertBodyTo
type="org.apache.activemq.command.ActiveMQMessage"/>
            <camel:to uri="log:com.elca?showAll=true&amp;multiline=true" />
        </camel:route>

How can I avoid this error ?

Causedby: No type converter available to convert from type: null to the
required type: org.apache.activemq.command.ActiveMQMessage with value null.
Exchange
[JmsMessage: ActiveMQMessage {commandId = 0, responseRequired = false,
messageId = ID:dell-charles-2709-1268314715843-1:0:0:0:8,
originalDestination =
 null, originalTransactionId = null, producerId =
ID:dell-charles-2709-1268314715843-1:0:0:0, destination =
topic://ActiveMQ.Advisory.Connection, tran
sactionId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime =
1268314769343, brokerOutTime = 1268314769343, correlationId = null, reply
To = null, persistent = false, type = Advisory, priority = 0, groupID =
null, groupSequence = 0, targetConsumerId = null, compressed = false, userID
=
 null, content = null, marshalledProperties =
org.apache.activemq.util.byteseque...@97e111, dataStructure = RemoveInfo
{commandId = 0, responseRequire
d = true, objectId = ID:dell-charles-2711-1268314762093-0:0,
lastDeliveredSequenceId = 0}, redeliveryCounter = 0, size = 0, properties =
{originBroker
Name=master, originBrokerId=ID:dell-charles-2709-1268314715843-0:0,
originBrokerURL=vm://master}, readOnlyProperties = true, readOnlyBody =
true, drop
pable = false}]. Caused by:
[org.apache.camel.NoTypeConversionAvailableException - No type converter
available to convert from type: null to the requi
red type: org.apache.activemq.command.ActiveMQMessage with value null]
        at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
        at
org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:55)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
        at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
        at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:161)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
        at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
        at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
        at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
        at
org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
        at
org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)
        ... 9 more

Kind regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Reply via email to