You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "jayanta.p" <ja...@issac.in> on 2016/03/15 12:39:02 UTC

Camel does not delete files on Windows

Hi All,

As I am using Apache Camel 2.14.2. version for one of my application, one
major problem I experienced last few days that file is not deleted by camel
after processing even after setting 'delete=true' in the configuration file.

Configuration file structure as below -


		<route id="route5">
			<from uri="file:E:\\MY FOLDER\\TESTFILE\\reports?delete=true" />
			<log message="INWARD / OUTWARD RETURN PROCESS : [${body}]" />

			<doTry>
				<process ref="inwardProcessorYesb" />

				<doCatch>
					
					<exception>java.io.IOException</exception>
					<exception>java.lang.IllegalStateException</exception>
					<exception>java.lang.Exception</exception>
				</doCatch>
			</doTry>
		</route> 

Thing is, the processor is invoked correctly but after completion of job it
is not deleting the file. 
Two files are showing in the above folder path. One is the original file and
another one is the .camelLock file. Therefore it is repeating the call to
Service ( actually, this is the logic written in the processor file). 

Kindly help me out there. How can I get rid poff this situation ? 

One information, this is running perfectly on Linux. (Ubuntu 14.4)


Thanks in advance,

Jayanta Pramanik




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-does-not-delete-files-on-Windows-tp5779085.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel does not delete files on Windows

Posted by Claus Ibsen <cl...@gmail.com>.
If you forget to close a input stream etc then windows will not delete
/ move the file. So double check your own code that you always close
what you open.

Also upgrade and try with latest release of Camel to see if it works
there. We fix bug all the time.

On Tue, Mar 15, 2016 at 12:39 PM, jayanta.p <ja...@issac.in> wrote:
> Hi All,
>
> As I am using Apache Camel 2.14.2. version for one of my application, one
> major problem I experienced last few days that file is not deleted by camel
> after processing even after setting 'delete=true' in the configuration file.
>
> Configuration file structure as below -
>
>
>                 <route id="route5">
>                         <from uri="file:E:\\MY FOLDER\\TESTFILE\\reports?delete=true" />
>                         <log message="INWARD / OUTWARD RETURN PROCESS : [${body}]" />
>
>                         <doTry>
>                                 <process ref="inwardProcessorYesb" />
>
>                                 <doCatch>
>
>                                         <exception>java.io.IOException</exception>
>                                         <exception>java.lang.IllegalStateException</exception>
>                                         <exception>java.lang.Exception</exception>
>                                 </doCatch>
>                         </doTry>
>                 </route>
>
> Thing is, the processor is invoked correctly but after completion of job it
> is not deleting the file.
> Two files are showing in the above folder path. One is the original file and
> another one is the .camelLock file. Therefore it is repeating the call to
> Service ( actually, this is the logic written in the processor file).
>
> Kindly help me out there. How can I get rid poff this situation ?
>
> One information, this is running perfectly on Linux. (Ubuntu 14.4)
>
>
> Thanks in advance,
>
> Jayanta Pramanik
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-does-not-delete-files-on-Windows-tp5779085.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2