jeudi 25 juin 2015

camel blueprint test not working with sql named parameters in sql.properties

Can any one suggest some solution for the below scenarios

  1. I have query(select id from emp.employee) to get Id from tblemployee.

its working and I am getting the value

  1. Inside second query and passing the id value after setting to header as named parameter like.
  2. select * from emp.address where empid=:#id

its working fine when I am I writing blueprint test its showing below exception

ERROR Failed delivery for (MessageId: ID-BLRKEC329635D-62313-1435237232679-0-3 on ExchangeId: ID-BLRKEC329635D-62313-1435237232679-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [{id=2}]]

the header values are also printing in the exchange like

Exchange

Exchange[ Id ID-BLRKEC329635D-62313-1435237232679-0-2 ExchangePattern InOnly Headers {breadcrumbId=ID-BLRKEC329635D-62313-1435237232679-0-1, CamelRedelivered=false, CamelRedeliveryCounter=0, CamelSqlRowCount=1, firedTime=Thu Jun 25 18:30:34 IST 2015, id=2} BodyType java.util.ArrayList Body [{id=2}] ]

Stacktrace

org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [{id=2}]]

Aucun commentaire:

Enregistrer un commentaire