You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mariusz <ma...@wp.pl> on 2013/09/14 23:04:12 UTC

GenericFileOperationFailedException for file deletion

Hi,

I'm trying to use fileLock (<from 
uri="file:source?delete=true&amp;readLock=fileLock"/>, Camel 
2.12.0) for fileEndpoint but I'm getting following exception:

Error during commit. Exchange[text.txt]. Caused by: 
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot 
delete file: GenericFile[text.txt]]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
delete file: GenericFile[text.txt]
	at 
org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.commit(GenericFileDeleteProcessStrategy.java:81)
	at 
org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:144)
	at 
org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)
	at 
org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)

It seems that it is not possible to delete file when LockFile is aquired. I 
see in code that in GenericFileDeleteProcessStrategy class file deletion is 
before:  exclusiveReadLockStrategy.releaseExclusiveReadLock(operations,
file, 
exchange);

Thanks,
Mariusz



--
View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperationFailedException-for-file-deletion-tp5739382.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: GenericFileOperationFailedException for file deletion

Posted by Mariusz <ma...@wp.pl>.
Hi Claus,

I have created JIRA: https://issues.apache.org/jira/browse/CAMEL-6750



--
View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperationFailedException-for-file-deletion-tp5739382p5739412.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: GenericFileOperationFailedException for file deletion

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah this is a bug. Feel free to log a JIRA ticket
http://camel.apache.org/support

On Sat, Sep 14, 2013 at 11:04 PM, Mariusz <ma...@wp.pl> wrote:
> Hi,
>
> I'm trying to use fileLock (<from
> uri="file:source?delete=true&amp;readLock=fileLock"/>, Camel
> 2.12.0) for fileEndpoint but I'm getting following exception:
>
> Error during commit. Exchange[text.txt]. Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Cannot
> delete file: GenericFile[text.txt]]
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> delete file: GenericFile[text.txt]
>         at
> org.apache.camel.component.file.strategy.GenericFileDeleteProcessStrategy.commit(GenericFileDeleteProcessStrategy.java:81)
>         at
> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:144)
>         at
> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)
>         at
> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)
>
> It seems that it is not possible to delete file when LockFile is aquired. I
> see in code that in GenericFileDeleteProcessStrategy class file deletion is
> before:  exclusiveReadLockStrategy.releaseExclusiveReadLock(operations,
> file,
> exchange);
>
> Thanks,
> Mariusz
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/GenericFileOperationFailedException-for-file-deletion-tp5739382.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen