[ 
https://issues.apache.org/jira/browse/CAMEL-16101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Brouckaert updated CAMEL-16101:
-------------------------------------
    Description: 
When using the "doneFileName=${[file:name|file://name/]}.done" option for the 
file component, camel throws the following error:

 

{{Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve 
endpoint: 
file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
 due to: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression.Caused by: 
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: 
file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
 due to: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression. at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:913)
 at 
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:794)
 at 
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
 at 
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177)
 at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:93) 
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:73) ... 
13 moreCaused by: java.lang.IllegalArgumentException: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression. at 
org.apache.camel.component.file.FileComponent.buildFileEndpoint(FileComponent.java:55)
 at 
org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:58)
 at 
org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:38)
 at 
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:170)
 at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:879)
 ... 18 more}}

  was:
When using the "doneFileName=${file:name}.done" option for the file component, 
camel throws the following error:

 
{quote}Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to 
resolve endpoint: 
file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
 due to: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression.Caused by: 
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: 
file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
 due to: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression. at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:913)
 at 
org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:794)
 at 
org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
 at 
org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177)
 at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:93) 
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:73) ... 
13 moreCaused by: java.lang.IllegalArgumentException: Invalid directory: 
/Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
 Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
option to set the dynamic expression. at 
org.apache.camel.component.file.FileComponent.buildFileEndpoint(FileComponent.java:55)
 at 
org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:58)
 at 
org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:38)
 at 
org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:170)
 at 
org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:879)
 ... 18 more
{quote}


> doneFileName=${file:name} not working for file component
> --------------------------------------------------------
>
>                 Key: CAMEL-16101
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16101
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.7.1
>            Reporter: Bryan Brouckaert
>            Priority: Major
>
> When using the "doneFileName=${[file:name|file://name/]}.done" option for the 
> file component, camel throws the following error:
>  
> {{Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to 
> resolve endpoint: 
> file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
>  due to: Invalid directory: 
> /Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
>  Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
> option to set the dynamic expression.Caused by: 
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: 
> file:///Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=$%7Bfile:name%7D.done
>  due to: Invalid directory: 
> /Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
>  Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
> option to set the dynamic expression. at 
> org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:913)
>  at 
> org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:794)
>  at 
> org.apache.camel.support.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:58)
>  at 
> org.apache.camel.reifier.AbstractReifier.resolveEndpoint(AbstractReifier.java:177)
>  at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:93) 
> at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:73) 
> ... 13 moreCaused by: java.lang.IllegalArgumentException: Invalid directory: 
> /Data/contactdb/upload/xx2cin&charset=utf8&delete=true&doneFileName=${file:name}.done.
>  Dynamic expressions with ${ } placeholders is not allowed. Use the fileName 
> option to set the dynamic expression. at 
> org.apache.camel.component.file.FileComponent.buildFileEndpoint(FileComponent.java:55)
>  at 
> org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:58)
>  at 
> org.apache.camel.component.file.GenericFileComponent.createEndpoint(GenericFileComponent.java:38)
>  at 
> org.apache.camel.support.DefaultComponent.createEndpoint(DefaultComponent.java:170)
>  at 
> org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:879)
>  ... 18 more}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to