You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Rajiv Jacob Cheriyan <ra...@gmail.com> on 2019/07/16 15:31:41 UTC
How to fix Missing ${ from the text: error - Apache Camel 2.12 to
2.16.4 uprade
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:yyyyMMddHHmmssSSS}.csv
*<camelContext xmlns="http://camel.apache.org/schema/spring
<http://camel.apache.org/schema/spring>"> <propertyPlaceholder
id="ignoreId" location="classpath:reformMB.properties"
prefixToken="${" suffixToken="}"/><route
id="sendNotification"> <from
uri="jms:queue:queue.sendNotification"/> <to
uri="file:${OnDemand.output.url}?fileName=RPFPos_L2W.$simple{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/>
</route></camelContext>*
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
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Looks like you mix $simple{ and ${
Use just $simple{
On Tue, Jul 16, 2019 at 5:32 PM Rajiv Jacob Cheriyan
<ra...@gmail.com> 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:yyyyMMddHHmmssSSS}.csv
>
>
>
>
>
>
>
>
>
>
>
>
> *<camelContext xmlns="http://camel.apache.org/schema/spring
> <http://camel.apache.org/schema/spring>"> <propertyPlaceholder
> id="ignoreId" location="classpath:reformMB.properties"
> prefixToken="${" suffixToken="}"/><route
> id="sendNotification"> <from
> uri="jms:queue:queue.sendNotification"/> <to
> uri="file:${OnDemand.output.url}?fileName=RPFPos_L2W.$simple{in.header.accountNum}-${date:now:yyyyMMddHHmmssSSS}.csv"/>
> </route></camelContext>*
>
>
> 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