On Wed, Jul 1, 2009 at 10:33 AM, Charles Moulliard<[email protected]> wrote:
> Hi,
>
> I have configured my file endpoint like this :
>
> file://d:/temp/data/notification/${date:now:yyyyMMdd}/${in.header.messageType}-${date:now:hhmmss}.txt
>
> Directory = /d:/temp/data/notification/${date:now:yyyyMMdd}/
> FileName = ${in.header.messageType}-${date:now:hhmmss}.txt
>
> Remark : notificationType is well present in the Header of the message
> exchange with this endpoint
>
> but Camel generates the following error :
>
> Caused by: java.io.FileNotFoundException:
> d:\temp\data\notification\${date:now:yyyyMMdd}\${in.header.messageType}-${date:now:hhmmss}.txt\ID-dell-charles-1778-1246434755850-1-17
> (The filename, directory name, or volume label syntax is incorrect)
>
> Where is the issue ?

The uri should contain the basepath in regular plain string text (its
NOT dynamic).
So it should be: file://d:/temp/data/notification

Then the dynamic part should be in the fileName option, as we want to
only poll this file.
So it should be:
${date:now:yyyyMMdd}/${in.header.messageType}-${date:now:hhmmss}.txt

And the total uri is then:
file://d:/temp/data/notification?fileName=${date:now:yyyyMMdd}/${in.header.messageType}-${date:now:hhmmss}.txt



>
> Regards
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to