camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From VinothKR <>
Subject Camel route set map object in body
Date Sun, 10 Apr 2016 02:33:41 GMT
I'm accessing a route through both producertemplate and a QuartzScheduler.

<route id="uaasRoute">
 <from uri="direct:hivein" />
  <el>select * from table where empId=${in.body.EmpId}</el>
 <to uri="jdbc:hive-ds?resetAutoCommit=false" />
 <to uri="mock:result" />

*I'm able to successfully pass employee id using producer template like

Map<String,Object> bodyMap = new HashMap<String,Object>();
		bodyMap.put("EmpId", "23456");
Object out = ProducerTemplate.requestBody("direct:hivein",bodyMap);

But unable to achieve the same using quartzScheduler route,
camel.addRoutes( new RouteBuilder() {
			public void configure() throws Exception {
				.setBody(new SimpleExpression(bodyMap.toString()))

Facing the issue,
Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
converter available to convert from type: java.lang.String to the required
type: java.util.Map

Is there any other way to achieve similar logic as ProducerTemplate in


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message