cFTP error: Error writing file

Problem Description

When a cFTP component is used to put files to an FTP location, the route creates an empty file with 0 bytes.

 

The same Put operation can transfer the files as expected to an FTP location using a tFTPPut component accordingly.

 

The stack trace captured in the console is shown below:

 

org.apache.camel.component.file.GenericFileOperationFailedException: Error writing file [EDI/in/TEST2]
	at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:279)
	at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)
	at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:58)
	at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:173)
	at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:341)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:168)
	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
	at test_equ.test_cfile_ftp_0_1.TEST_CFILE_FTP$1$1$1.process(TEST_CFILE_FTP.java:130)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)
	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:442)
	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:214)
	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:178)
	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

 

Solution

The route test cases do not work with JRE. Instead, you should install JDK.

Version history
Revision #:
9 of 9
Last update:
‎07-05-2019 03:54 AM
Updated by: