How to fix Missing ${ from the text: error - Apache Camel 2.12 to 2.16.4 uprade

2019-07-16 Thread Rajiv Jacob Cheriyan
Hello,

We are upgrading from Apache Camel 2.12 to 2.16.4 and running into issues
with one of the routes.

Caused by: java.lang.IllegalArgumentException: Missing ${ from the text:
file:C:\OnDemandOutput?fileName=RPFPos_L2W.$simple{in.header.accountNum}-${date:now:MMddHHmmssSSS}.csv












*http://camel.apache.org/schema/spring
">
*


As per documentation this should have worked. Can someone help me in
understanding what is wrong ?
http://camel.apache.org/using-propertyplaceholder.html

Clashing Spring Property Placeholders with Camels Simple Language Take
notice when using Spring bridging placeholder then the spring ${} syntax
clashes with the Simple in Camel, and therefore take care.

Example:

xml {{file.rootdir}}/${in.header.CamelFileName} clashes with Spring
property placeholders, and you should use $simple{} to indicate using the
Simple language in Camel.

xml {{file.rootdir}}/$simple{in.header.CamelFileName}


Re: How to fix Missing ${ from the text: error - Apache Camel 2.12 to 2.16.4 uprade

2019-07-17 Thread Claus Ibsen
Hi

Looks like you mix $simple{ and ${

Use just $simple{

On Tue, Jul 16, 2019 at 5:32 PM Rajiv Jacob Cheriyan
 wrote:
>
> Hello,
>
> We are upgrading from Apache Camel 2.12 to 2.16.4 and running into issues
> with one of the routes.
>
> Caused by: java.lang.IllegalArgumentException: Missing ${ from the text:
> file:C:\OnDemandOutput?fileName=RPFPos_L2W.$simple{in.header.accountNum}-${date:now:MMddHHmmssSSS}.csv
>
>
>
>
>
>
>
>
>
>
>
>
> *http://camel.apache.org/schema/spring
> "> id="ignoreId" location="classpath:reformMB.properties"
>  prefixToken="${" suffixToken="}"/> id="sendNotification"> uri="jms:queue:queue.sendNotification"/> uri="file:${OnDemand.output.url}?fileName=RPFPos_L2W.$simple{in.header.accountNum}-${date:now:MMddHHmmssSSS}.csv"/>
> *
>
>
> As per documentation this should have worked. Can someone help me in
> understanding what is wrong ?
> http://camel.apache.org/using-propertyplaceholder.html
>
> Clashing Spring Property Placeholders with Camels Simple Language Take
> notice when using Spring bridging placeholder then the spring ${} syntax
> clashes with the Simple in Camel, and therefore take care.
>
> Example:
>
> xml {{file.rootdir}}/${in.header.CamelFileName} clashes with Spring
> property placeholders, and you should use $simple{} to indicate using the
> Simple language in Camel.
>
> xml {{file.rootdir}}/$simple{in.header.CamelFileName}



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2