0
votes

HI I am getting following error when i am using spring+ jboss fuse + Apache active MQ, I heard there is some type converts if type converters is solution please give me a good sample

My route in camel-context.xml is :

<route id="visa-inprogress-trigger" autoStartup="{{visa.inprogress.task.autostart}}">
            <description>Visa In-Progress Trigger</description>
            <from uri="timer://visaInprogressTrigger?period={{visa.document.generation.trigger.interval}}"/>
            <bean ref="visaInProcessTrigger" method="trigger" />
            <to uri="jmsTemplateComponent:visa-inprogress-queue"/>          
        </route>

        <route id="visa-inprogress-handler" autoStartup="{{visa.inprogress.task.autostart}}">
            <description>Visa In-progress Handler</description>
            <from uri="amqComponent:queue:visa-inprogress-queue"/>
            <bean ref="visaInProcessHandler" method="handle" />
        </route>

My trigger will returns List> after that I am getting exception like below

**org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage[JmsMessageID: ID:HMECD000781-58596-1378127658725-3:1:24:1:1]]

Caused by: org.apache.camel.InvalidPayloadException: No body available of type: org.springframework.util.LinkedCaseInsensitiveMap but has value: "phani" of type: java.lang.String on: JmsMessage[JmsMessageID: ID:HMECD000781-58596-1378127658725-3:1:24:1:1]. Caused by: No type converter available to convert from type: java.lang.String to the required type: org.springframework.util.LinkedCaseInsensitiveMap with value "some blah some blah". Exchange[JmsMessage[JmsMessageID: ID:HMECD000781-58596-1378127658725-3:1:24:1:1]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: java.lang.String to the required type: org.springframework.util.LinkedCaseInsensitiveMap with value "some blah some blah"]

Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.lang.String to the required type: org.springframework.util.LinkedCaseInsensitiveMap with value "some blah some blah"

**

Please reply me asap

1
That'a a very long stack trace. You might want to shorten it to just the relevant parts. What does the code of your Camel route look like? - Jakub Korab
@Jake I updated my question as you asked - Phani Kumar Bhavirisetty

1 Answers

1
votes

I am not sure what your jmsTemplateComponent does, but the standard JMS/ActiveMQ component can have messages sent to it.

<to uri="amqComponent:queue:visa-inprogress-queue"/>