I've gotten around the problem by turning it into a processor but the route was pro grammatically generated as
from( "file:/home/myuser/data/in") .to( "bean:myLogger?method=logStart" ) .process( processor1 ) .to( "bean:myLogger?method=logEnd" ); I'll try and come up with an isolated test case I can post to later. On Sat, Dec 18, 2010 at 6:23 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Can you post Camel version used and the route you are using? > > > On Fri, Dec 17, 2010 at 6:42 PM, Craig Taylor <ctalk...@ctalkobt.net> > wrote: > > I'm attempting to fire a bean method "logStart" and am receiving a > > conversion error as it appears it's treating my initial integer parameter > as > > the body. From trace logs: > > > > 12:33:17,297 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 296 | Creating MethodInfo for class: > class > > $Proxy187 method: public final void > > $Proxy187.logStart(java.lang.Integer,java.lang.Strin > > 12:33:17,297 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 307 | Parameter #0: > ParameterInfo[index=0, > > type=class java.lang.Integer, annotations=[], expression=null] > > 12:33:17,297 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 328 | Parameter #0 is the body > parameter > > using expression mandatoryBodyAs[java.lang.Integer] > > 12:33:17,297 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 337 | Parameter #0 has parameter info: > > ParameterInfo[index=0, type=class java.lang.Integer, annotations=[], > > expression=mandatoryBod > > 12:33:17,298 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 307 | Parameter #1: > ParameterInfo[index=1, > > type=class java.lang.String, annotations=[], expression=null] > > 12:33:17,298 | TRACE | tenerContainer-1 | BeanInfo > | > > he.camel.component.bean.BeanInfo 337 | Parameter #1 has parameter info: > > ParameterInfo[index=1, type=class java.lang.String, annotations=[], > > expression=null] > > 12:33:17,298 | TRACE | tenerContainer-1 | MethodInfo > | > > .camel.component.bean.MethodInfo 220 | Creating parameters expression > for 2 > > parameters > > 12:33:17,298 | TRACE | tenerContainer-1 | MethodInfo > | > > .camel.component.bean.MethodInfo 228 | Parameter #0 has expression: > > mandatoryBodyAs[java.lang.Integer] > > 12:33:17,298 | TRACE | tenerContainer-1 | MethodInfo > | > > .camel.component.bean.MethodInfo 228 | Parameter #1 has expression: null > > > > where my function definition is : > > > > @Handler > > public void logStart( @Header("MY_ID") Integer myId, > > @Header("CamelFileName") String filename ) > > > > Changing the Integer myId, and the associated setHeader to strings > > apparently causes this to work. I'd much prefer to use an integer id > rather > > than a string. > > > > > > -- > > ------------------------------------------- > > Craig Taylor > > ctalk...@ctalkobt.net > > > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cib...@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > -- ------------------------------------------- Craig Taylor ctalk...@ctalkobt.net