On Tue, Jan 5, 2010 at 6:16 PM, /U <[email protected]> wrote: > > Thanks for the help Claus. After removing the trailing &, it now > yields FailedToStartRouteException: apparently the directory is > not valid but the directory (C:\ftp\data\in.txt) is valid: > > Caused by: java.lang.IllegalArgumentException: Only directory is supported. > Endpoint must be configured with a valid starting directory: > C:\ftp\data\in.txt > > This is likely a different problem - but I would appreciate any hints! >
C:\ftp\data\in.txt must be a directory (= folder). So you should configure it as: C:\ftp\data\ If you *only* want to read a single file in.txt then use fileName=in.txt to force that file only. Or you can use some of the filters to only include certain files, such as *.txt etc. See the file documentation at the Camel site. > Thanx! > > /U > > > > Claus Ibsen-2 wrote: >> >> On Tue, Jan 5, 2010 at 7:21 AM, /U <[email protected]> wrote: >>> >>> I have a simple route transferring contents of files >>> in a folder to a JMS queue: >>> >>> >>> <camelContext >>> xmlns="http://activemq.apache.org/camel/schema/spring"> >>> <route> >>> <from >>> uri="file:///ftp/data/in.txt/?useFixedDelay=true&delay=1000&"/> >>> <to uri="jms:queue:mytopic.publish"/> >>> </route> >>> </camelContext> >>> >>> When I start the context, it fails with the exception shown below. >>> why these parameters are not recognized? please help! >>> >> >> Ah remove the last trailing &. I guess we should detect this >> misconfiguration as well and report a better error. >> >>> >>> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >>> endpoint: >>> file:///ftp/data/in.txt/?useFixedDelay=true&delay=1000& due to: >>> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >>> endpoint: >>> file:///ftp/data/in.txt/?useFixedDelay=true&delay=1000& due to: There are >>> 2 >>> parameters that couldn't be set on the endpoint. Check the uri if the >>> parameters are spelt correctly and that they are properties of the >>> endpoint. >>> Unknown parameters=[{useFixedDelay=true, delay=1000}] >>> at >>> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:351) >>> //... >>> >>> /U >>> -- >>> View this message in context: >>> http://old.nabble.com/ResolveEndpointFailedException-with-a-file-endpoint-tp27024218p27024218.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> >> > > -- > View this message in context: > http://old.nabble.com/ResolveEndpointFailedException-with-a-file-endpoint-tp27024218p27026666.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
