[ 
https://issues.apache.org/jira/browse/CAMEL-9340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15029107#comment-15029107
 ] 

ASF GitHub Bot commented on CAMEL-9340:
---------------------------------------

GitHub user snurmine opened a pull request:

    https://github.com/apache/camel/pull/698

    CAMEL-9340: Using user.dir as default dir for fileStore file when fil…

    CAMEL-9340: Using user.dir as default dir for fileStore file when fileStore 
when file has no parent dir.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/snurmine/camel CAMEL-9340

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/698.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #698
    
----

----


> FileIdempotentRepository fails to create fileStore when no path is specified
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-9340
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9340
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.16.0
>            Reporter: Ken Geis
>            Priority: Trivial
>             Fix For: 2.16.2, 2.17.0
>
>
> I create a FileIdempotentRepository like this:
> {code}
> .idempotentConsumer(fileIdempotentRepository(new File('ids'))) {
>     it.in.body.id
> }
> {code}
> I get an error, and I traced it to:
> {noformat}
> Caused by: java.lang.NullPointerException: null
>       at 
> org.apache.camel.processor.idempotent.mpotentRepository.loadStore(FileIdempotentRepository.java:293)
>  ~[camel-core-2.16.0.jar:2.16.0]
>       at 
> org.apache.camel.processor.idempotent.FileIdempotentRepository.doStart(FileIdempotentRepository.java:328)
>  ~[camel-core-2.16.0.jar:2.16.0]
> {noformat}
> The FileIdempotentRepository is trying to create the parent directory of the 
> file that was specified for the file store. If a path to the file is not 
> specified, then getParentFile() returns null. Calling .mkdirs() on that bombs.
> This route works the second time it runs because then the file exists. It 
> also works if I specify my file name as "./ids" instead of "ids".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to