Camel not able to delete files Outside .camel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Camel not able to delete files Outside .camel

chandangowda
This post was updated on .
From one route I’m reading ZIP files after successful completion of reading of files,camel not able to delete those files i.e. after moving files inside .camel from outside .camel and throughing following exception.This issue happened only for  first 21 records  out of 1000 records.Please replay ASAP.

Camel Version-2.12.1
OS-Windows 7
JDK-1.7.0_67

Stack trace

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: E:\XX\XX\XXXX\XXXXX-000001-XXXX.zip
        at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:269)
        at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:278)
        at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)
        at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:80)
        at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
        at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
        at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
        at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: E:\XXX\XXXX\XX\XXXX-000001-XXX.zip (Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at org.apache.camel.component.file.FileOperations.prepareOutputFileChannel(FileOperations.java:430)
        at org.apache.camel.component.file.FileOperations.writeFileByFile(FileOperations.java:353)
        at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:242)
        ... 21 more
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Camel not able to delete files Outside .camel

siano
Hi,

Caused by: java.io.FileNotFoundException: E:\XXX\XXXX\XX\XXXX-000001-XXX.zip
(Access is denied)

This looks as if the process running your camel route does not have access to the directory containing the file (it would need execution rights on the directory).

Best regards
Stephan

-----Original Message-----
From: chandangowda [mailto:[hidden email]]
Sent: Montag, 17. April 2017 12:09
To: [hidden email]
Subject: Camel not able to delete files Outside .camel

From one route I’m reading ZIP files after successful completion of reading
of files,camel not able to delete those files i.e. after moving files inside
.camel from outside .camel and throughing following exception.This issue
happened only for  first 21 records  out of 1000 records.Please replay ASAP.

Stack trace

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: E:\XX\XX\XXXX\XXXXX-000001-XXXX.zip
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:269)
        at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:278)
        at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)
        at
org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:80)
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
        at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
        at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
        at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
        at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
        at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
        at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: E:\XXX\XXXX\XX\XXXX-000001-XXX.zip
(Access is denied)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at
org.apache.camel.component.file.FileOperations.prepareOutputFileChannel(FileOperations.java:430)
        at
org.apache.camel.component.file.FileOperations.writeFileByFile(FileOperations.java:353)
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:242)
        ... 21 more



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-not-able-to-delete-files-Outside-camel-tp5797768.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Loading...