camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-9238) NPE while GenericFile.changeFileName
Date Tue, 20 Oct 2015 13:54:27 GMT

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

Claus Ibsen commented on CAMEL-9238:
------------------------------------

Can you tell us your file endpoint configuration

> NPE while GenericFile.changeFileName
> ------------------------------------
>
>                 Key: CAMEL-9238
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9238
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.15.2, 2.15.3
>         Environment: Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
> System: Mac OS X version 10.10.5 running on x86_64; UTF-8; de_DE
>            Reporter: Adi König
>
> If a relative file path is specified for the {{move}} or {{moveFailed}} Attribute of
the file2 component, a NullPointerException is thrown while processing the onCompletion commit
resp. rollback strategy.
> And because the processed file cannot be moved away, the processing is restarted again
and so on...
> Wrong code line (GenericFile.java:203 in camel-core V2.15.3):
> {code:java}
> ObjectHelper.after(newFileName, newEndpointPath + File.separatorChar);
> {code}
> when {{newFileName}} and {{newEndpointPath}} are both relative paths.
> Stacktrace:
> {code:java}
> java.lang.NullPointerException
> 	at java.io.File.<init>(File.java:277) ~[?:1.8.0_60]
> 	at org.apache.camel.component.file.GenericFile.changeFileName(GenericFile.java:207)
~[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.strategy.GenericFileExpressionRenamer.renameFile(GenericFileExpressionRenamer.java:41)
~[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:87)
~[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:124)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:80)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:54)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:104)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:229) [camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.util.UnitOfWorkHelper.doneUow(UnitOfWorkHelper.java:65) [camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:637)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.after(CamelInternalProcessor.java:605)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:239)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.processor.Pipeline.process(Pipeline.java:106) [camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:439)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:211)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:175)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
[camel-core-2.15.3.jar:2.15.3]
> 	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [camel-core-2.15.3.jar:2.15.3]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_60]
> 	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_60]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
[?:1.8.0_60]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
[?:1.8.0_60]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_60]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_60]
> {code}



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

Mime
View raw message