Hello Team, I was new to camel FTP, and used CamelDSL to read file from FTP location and copy to local drive.
Working fine when trying to copy file from one location to another in the local machine. Find the camel context file below and error while reading file from FTP location. camel-context-ftp.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring-2.10.0.xsd"> <bean id="myTstProcessor" class="com.test.camel.processor.pkg.MyProcessor"> </bean> <camelContext xmlns="http://camel.apache.org/schema/spring"> <endpoint id="abhishekFtp" uri="ftp://mahendra@10.42.58.206:21/srcFtp/files?password=mahendra" /> <route> <from ref="abhishekFtp" /> <to uri="file://D:/destFtp" /> </route> </camelContext> </beans> error logs : INFO [localhost-startStop-1] (ContextLoader.java:194) - Root WebApplicationContext: initialization started INFO [localhost-startStop-1] (AbstractApplicationContext.java:456) - Refreshing Root WebApplicationContext: startup date [Fri Nov 21 11:45:21 IST 2014]; root of context hierarchy INFO [localhost-startStop-1] (XmlBeanDefinitionReader.java:315) - Loading XML bean definitions from class path resource [camel-context-ftp.xml] INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:623) - Overriding bean definition for bean 'abhishekFtp': replacing [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.apache.camel.spring.CamelEndpointFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] INFO [localhost-startStop-1] (DefaultListableBeanFactory.java:557) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@23b6c184: defining beans [myTstProcessor,abhishekFtp,template,consumerTemplate,camel-1:beanPostProcessor,camel-1]; root of factory hierarchy INFO [localhost-startStop-1] (DefaultCamelContext.java:1381) - Apache Camel 2.10.0 (CamelContext: camel-1) is starting INFO [localhost-startStop-1] (ManagementStrategyFactory.java:43) - JMX enabled. INFO [localhost-startStop-1] (DefaultManagementLifecycleStrategy.java:849) - StatisticsLevel at All so enabling load performance statistics INFO [localhost-startStop-1] (DefaultTypeConverter.java:45) - Loaded 170 type converters INFO [localhost-startStop-1] (DefaultCamelContext.java:2015) - Route: route1 started and consuming from: Endpoint[ftp://mahendra@10.42.58.206:21/srcFtp/files?password=******] INFO [localhost-startStop-1] (DefaultCamelContext.java:1416) - Total 1 routes, of which 1 is started. INFO [localhost-startStop-1] (DefaultCamelContext.java:1417) - Apache Camel 2.10.0 (CamelContext: camel-1) started in 0.483 seconds INFO [localhost-startStop-1] (ContextLoader.java:221) - Root WebApplicationContext: initialization completed in 1937 ms 21 Nov, 2014 11:45:23 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] 21 Nov, 2014 11:45:23 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] 21 Nov, 2014 11:45:23 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 3483 ms INFO [Camel (camel-1) thread #1 - ftp://mahendra@10.42.58.206:21/srcFtp/files] (RemoteFileConsumer.java:146) - Connected and logged in to: ftp://mahendra@10.42.58.206:21 WARN [Camel (camel-1) thread #1 - ftp://mahendra@10.42.58.206:21/srcFtp/files] (MarkerIgnoringBase.java:136) - Error processing file GenericFile[testDoc.ods] due to Cannot retrieve file: GenericFile[testDoc.ods] from: Endpoint[ftp://mahendra@10.42.58.206:21/srcFtp/files?password=******]. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot retrieve file: GenericFile[testDoc.ods] from: Endpoint[ftp://mahendra@10.42.58.206:21/srcFtp/files?password=******]] org.apache.camel.component.file.GenericFileOperationFailedException: Cannot retrieve file: GenericFile[testDoc.ods] from: Endpoint[ftp://mahendra@10.42.58.206:21/srcFtp/files?password=******] at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:322) at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:94) at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:139) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) Please help me out in resolving this issue. Regards, Abhishek Gupta -- View this message in context: http://camel.465427.n5.nabble.com/Not-able-to-copy-file-from-FTP-location-to-local-machine-tp5759403.html Sent from the Camel - Users mailing list archive at Nabble.com.