You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jaishankar <ja...@wipro.com> on 2014/04/22 11:44:22 UTC

Aggregate Error

This is the source code:	                               
person/firstName/text()                                                       
${in.header.breadcrumbId}                                   
&lt;convertBodyTo type="java.lang.String"/&gt;                           
corrId                                                                                                                                                           
The error which I'm getting is " Error during type conversion from type:
java.lang.String to the required type: java.lang.Integer with value  due
java.lang.NumberFormatException: For input string: ""  "In route 2 target
folder there are 2 files called msg1, msg2 with some name.Please help to
resolve this error.



--
View this message in context: http://camel.465427.n5.nabble.com/Aggregate-Error-tp5750428.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Aggregate Error

Posted by "kraythe ." <kr...@gmail.com>.
Your correlation expression is clearly returning a "" when it is expecting
a value that can be converted to an integer. The question would be what
does the xpath person/firstName/text() resolve to for each of the files.

The easiest way to debug things like this is to turn on a tracer in camel
and step through the log output of the route step by step reading the state
of the route at each point.

Also the question strikes me of why you are using a correlation expression
here. You never use it in the aggregator itself so why pass it in the DSL?
And usually a breadcrumb is unique to an exchange so I dont know how that
would correlate properly.


*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Wed, Apr 23, 2014 at 2:06 AM, Jaishankar <ja...@wipro.com>wrote:

> sorucecode.txt
> <http://camel.465427.n5.nabble.com/file/n5750462/sorucecode.txt>
>
>
> I have attached the source code. Please reply me.
>
> The error message
>
> "Stacktrace
>
> ---------------------------------------------------------------------------------------------------------------------------------------
> org.apache.camel.TypeConversionException: Error during type conversion from
> type: java.lang.String to the required type: java.lang.Integer with value
> due java.lang.NumberFormatException: For input string: ""
>
> "
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Aggregate-Error-tp5750428p5750462.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Aggregate Error

Posted by Jaishankar <ja...@wipro.com>.
sorucecode.txt
<http://camel.465427.n5.nabble.com/file/n5750462/sorucecode.txt>  


I have attached the source code. Please reply me.

The error message 

"Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.TypeConversionException: Error during type conversion from
type: java.lang.String to the required type: java.lang.Integer with value 
due java.lang.NumberFormatException: For input string: ""

"



--
View this message in context: http://camel.465427.n5.nabble.com/Aggregate-Error-tp5750428p5750462.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Aggregate Error

Posted by "kraythe ." <kr...@gmail.com>.
Thats a little piecemeal friend. Hard to tell what is going on from what
you posted. Can you try again with the actual XML route code?

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Tue, Apr 22, 2014 at 4:44 AM, Jaishankar <ja...@wipro.com>wrote:

> This is the source code:
> person/firstName/text()
> ${in.header.breadcrumbId}
> &lt;convertBodyTo type="java.lang.String"/&gt;
> corrId
> The error which I'm getting is " Error during type conversion from type:
> java.lang.String to the required type: java.lang.Integer with value  due
> java.lang.NumberFormatException: For input string: ""  "In route 2 target
> folder there are 2 files called msg1, msg2 with some name.Please help to
> resolve this error.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Aggregate-Error-tp5750428.html
> Sent from the Camel - Users mailing list archive at Nabble.com.