[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

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

abccbaandy commented on CAMEL-12337:


I tried latest 2.20.3-SNAPSHOT, look everything work as expected.

thanks, look forward to 2.20.3 released :)

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2, 2.21.0
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12271) SharedInternalProcessor attempts to call ResultProcessor after camel upgrade

2018-03-12 Thread Daniel Fullarton (JIRA)

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

Daniel Fullarton commented on CAMEL-12271:
--

It's a custom POJO, using jackson to deserialize

> SharedInternalProcessor attempts to call ResultProcessor after camel upgrade
> 
>
> Key: CAMEL-12271
> URL: https://issues.apache.org/jira/browse/CAMEL-12271
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1
>Reporter: Daniel Fullarton
>Priority: Minor
>
> After upgrading from 2.19.4 we are experiencing backwards compatibility 
> issues due to the introduction of the SharedInternalProcessor
> A test of handling an empty 200 response body from a camel-http route now 
> produces the following error :
> {noformat}
> org.apache.camel.InvalidPayloadException: No body available of type: 
> #RESPONSE CLASS# but has value: 
> org.apache.camel.converter.stream.InputStreamCache@7cbb65f9 of type: 
> org.apache.camel.converter.stream.InputStreamCache on: Message[]. Caused 
> by: No type converter available to convert from type: 
> org.apache.camel.converter.stream.InputStreamCache to the required type: 
> ##RESPONSE CLASS## with value 
> org.apache.camel.converter.stream.InputStreamCache@7cbb65f9. Exchange[]. 
> Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type 
> converter available to convert from type: 
> org.apache.camel.converter.stream.InputStreamCache to the required type: 
> ##RESPONSE CLASS## with value 
> org.apache.camel.converter.stream.InputStreamCache@7cbb65f9]
> 14:55:07 [tests] at 
> org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:117)
> 14:55:07 [tests] at 
> org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:98)
> 14:55:07 [tests] at 
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
> 14:55:07 [tests] at 
> org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:69)
> 14:55:07 [tests] at 
> org.apache.camel.processor.SharedCamelInternalProcessor$InternalCallback.done(SharedCamelInternalProcessor.java:229)
> 14:55:07 [tests] at 
> org.apache.camel.processor.CamelInternalProcessor$InternalCallback.done(CamelInternalProcessor.java:262)
> 14:55:07 [tests] at 
> org.apache.camel.processor.Pipeline.process(Pipeline.java:127)
> 14:55:07 [tests] at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
> 14:55:07 [tests] at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
> 14:55:07 [tests] at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
> 14:55:07 [tests] at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
> 14:55:07 [tests] at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541)
> 14:55:07 [tests] at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506)
> 14:55:07 [tests] at 
> org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369)
> 14:55:07 [tests] at 
> org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506)
> 14:55:07 [tests] at 
> org.apache.camel.impl.ProducerCache.send(ProducerCache.java:264)
> 14:55:07 [tests] at 
> org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:355)
> 14:55:07 [tests] ... 10 more
> {noformat}
> Digging into the code I can see that:
> [https://github.com/apache/camel/commit/30917aba7d23be2a408660f3e4dd503a9cad5015#diff-ada5b0d990676bbc7d99201682c3065dR223]
> Now calls the resultProcessor in the internal callback, previously it seems 
> to have only done this when the underlying pipeline was successful?
> I will try to find a way to replicate this outside of our environment but 
> this appears to be a behavioural change in the way errors are handled.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12348) camel-core - Potential NPE in ExchangeHelper.isStreamCaching

2018-03-12 Thread Adrian Hope-Bailie (JIRA)

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

Adrian Hope-Bailie commented on CAMEL-12348:


This can be re-created using the following project by replacing the inline 
processor definition with the commented out "marshal()" call:

[https://github.com/adrianhopebailie/ilp-node]

 

Incoming connections can be simulated using the "example.js" sample in 
[https://github.com/interledgerjs/ilp-protocol-psk2] and twerakign this to use 
the same address configured in the server (wss://localhost:9090/btp).

 

> camel-core - Potential NPE in ExchangeHelper.isStreamCaching
> 
>
> Key: CAMEL-12348
> URL: https://issues.apache.org/jira/browse/CAMEL-12348
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.2, 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.1, 2.22.0
>
>
> See SO
> https://stackoverflow.com/questions/49235152/defaultcamelcontext-getroutes-is-empty-so-exchangehelper-isstreamcachingenable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12337:
-

You can wait until the CI server has built a new one, but make sure its a new 
build and not the previous timestamp you are testing again

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2, 2.21.0
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Reopened] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reopened CAMEL-12337:
-

Need to cherry-pick to 2.21.x branch when its created

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2, 2.21.0
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12348) camel-core - Potential NPE in ExchangeHelper.isStreamCaching

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12348:
-

Need to cherry-pick to 2.21.x branch when its created

> camel-core - Potential NPE in ExchangeHelper.isStreamCaching
> 
>
> Key: CAMEL-12348
> URL: https://issues.apache.org/jira/browse/CAMEL-12348
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.2, 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.1, 2.22.0
>
>
> See SO
> https://stackoverflow.com/questions/49235152/defaultcamelcontext-getroutes-is-empty-so-exchangehelper-isstreamcachingenable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12348) camel-core - Potential NPE in ExchangeHelper.isStreamCaching

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12348:

Fix Version/s: 2.19.5

> camel-core - Potential NPE in ExchangeHelper.isStreamCaching
> 
>
> Key: CAMEL-12348
> URL: https://issues.apache.org/jira/browse/CAMEL-12348
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.2, 2.21.0
>Reporter: Claus Ibsen
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.19.5, 2.20.3, 2.21.1, 2.22.0
>
>
> See SO
> https://stackoverflow.com/questions/49235152/defaultcamelcontext-getroutes-is-empty-so-exchangehelper-isstreamcachingenable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

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

abccbaandy commented on CAMEL-12337:


I use this repo to get the previous snapshot.
https://repository.apache.org/content/repositories/snapshots/

I have to build the snapshot by myself this time? or just wait few hours?

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2, 2.21.0
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12348) camel-core - Potential NPE in ExchangeHelper.isStreamCaching

2018-03-12 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12348:
---

 Summary: camel-core - Potential NPE in 
ExchangeHelper.isStreamCaching
 Key: CAMEL-12348
 URL: https://issues.apache.org/jira/browse/CAMEL-12348
 Project: Camel
  Issue Type: Bug
  Components: camel-core
Affects Versions: 2.20.2, 2.21.0
Reporter: Claus Ibsen
Assignee: Claus Ibsen
 Fix For: 2.20.3, 2.21.1, 2.22.0


See SO

https://stackoverflow.com/questions/49235152/defaultcamelcontext-getroutes-is-empty-so-exchangehelper-isstreamcachingenable



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12337:

Affects Version/s: 2.21.0

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2, 2.21.0
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12337:
-

Okay pushed a fix, can you rebuild SNAPSHOT and test again.

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12337:

Fix Version/s: 2.22.0

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1, 2.22.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12337:

Fix Version/s: (was: 2.21.0)
   2.21.1

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12337:
-

Yeah we should have guarded that change dir operation as well.

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.1
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12347) Reduce the usage of 3rd party maven repos

2018-03-12 Thread Andrea Cosentino (JIRA)

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

Andrea Cosentino commented on CAMEL-12347:
--

camel-nagios use a released version ported on maven central, so we should be 
fine.

 

https://github.com/jsendnsca/jsendnsca

> Reduce the usage of 3rd party maven repos
> -
>
> Key: CAMEL-12347
> URL: https://issues.apache.org/jira/browse/CAMEL-12347
> Project: Camel
>  Issue Type: Task
>Reporter: Claus Ibsen
>Priority: Major
> Fix For: 2.22.0
>
>
> Some components are downloading JARs that seems to be only on 3rd party repos 
> - We should try to rely only on maven central whenever possible
> Sometimes it may be test scoped and we can switch to something else etc.
> I have been told these components may do that:
>  * camel-Jira
>  * camel-nagios
>  * camel-solr
>  * itest
>  * camel-restlet
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12347) Reduce the usage of 3rd party maven repos

2018-03-12 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12347:
---

 Summary: Reduce the usage of 3rd party maven repos
 Key: CAMEL-12347
 URL: https://issues.apache.org/jira/browse/CAMEL-12347
 Project: Camel
  Issue Type: Task
Reporter: Claus Ibsen
 Fix For: 2.22.0


Some components are downloading JARs that seems to be only on 3rd party repos - 
We should try to rely only on maven central whenever possible

Sometimes it may be test scoped and we can switch to something else etc.

I have been told these components may do that:
 * camel-Jira
 * camel-nagios
 * camel-solr
 * itest
 * camel-restlet

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12346) Deprecate camel-jira as the java lib is deprecated by atlassian

2018-03-12 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12346:
---

 Summary: Deprecate camel-jira as the java lib is deprecated by 
atlassian
 Key: CAMEL-12346
 URL: https://issues.apache.org/jira/browse/CAMEL-12346
 Project: Camel
  Issue Type: Task
Reporter: Claus Ibsen
 Fix For: 2.22.0


As title says, its deprecated.

They recommend the REST api, so we would need to build a new camel-jira-rest 
component if we want a new component for that.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

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

abccbaandy edited comment on CAMEL-12337 at 3/12/18 1:02 PM:
-

version 
2.20.3-SNAPSHOT

test option
{code:java}
autoCreate=false=true=true
{code}


sftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
change directory to: notexist
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:609)
at 
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:597)
at 
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:108)
at 
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2367)
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:607)
{code}

ftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: File 
operation failed: 550 The system cannot find the file specified. 
 Cannot change directory to: notexist. Code: 550
at 
org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
at 
org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
at 
org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
at 
org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}



was (Author: abccbaandy):
sftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
change directory to: notexist
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:609)
at 
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:597)
at 
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:108)
at 
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 

[jira] [Updated] (CAMEL-12345) LinkedIn component throws IllegalArgumentException on API requests

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12345:

Fix Version/s: 2.21.1

> LinkedIn component throws IllegalArgumentException on API requests
> --
>
> Key: CAMEL-12345
> URL: https://issues.apache.org/jira/browse/CAMEL-12345
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.21.0
>Reporter: James Netherton
>Priority: Major
> Fix For: 2.21.1, 2.22.0
>
>
> Almost all of the camel-linkedin integration tests are failing on master and 
> for the 2.21.0 tag. The error is pretty much the same for all of them. For 
> example SearchResourceIntegrationTest.testSearchCompanies:
>  
> {code:java}
> Caused by: org.apache.camel.RuntimeCamelException: Error invoking 
> searchCompanies with {keywords=linkedin, fields=}: Value for fields is not 
> specified
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514)
> at 
> org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
> at 
> org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43)
> at 
> org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalArgumentException: Value for fields is not 
> specified
> at 
> org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:824)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179)
> at com.sun.proxy.$Proxy54.searchCompanies(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506)
> ... 10 more{code}
>  
> I tried setting the CamelLinkedIn.fields header, but this leads to further 
> errors. The CXF 3.2.2 upgrade may be the culprit here. The tests run fine on 
> Camel 2.20.x with CXF 3.2.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (CAMEL-12345) LinkedIn component throws IllegalArgumentException on API requests

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-12345:

Fix Version/s: 2.22.0

> LinkedIn component throws IllegalArgumentException on API requests
> --
>
> Key: CAMEL-12345
> URL: https://issues.apache.org/jira/browse/CAMEL-12345
> Project: Camel
>  Issue Type: Bug
>Affects Versions: 2.21.0
>Reporter: James Netherton
>Priority: Major
> Fix For: 2.21.1, 2.22.0
>
>
> Almost all of the camel-linkedin integration tests are failing on master and 
> for the 2.21.0 tag. The error is pretty much the same for all of them. For 
> example SearchResourceIntegrationTest.testSearchCompanies:
>  
> {code:java}
> Caused by: org.apache.camel.RuntimeCamelException: Error invoking 
> searchCompanies with {keywords=linkedin, fields=}: Value for fields is not 
> specified
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514)
> at 
> org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
> at 
> org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43)
> at 
> org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalArgumentException: Value for fields is not 
> specified
> at 
> org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:824)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452)
> at 
> org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179)
> at com.sun.proxy.$Proxy54.searchCompanies(Unknown Source)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506)
> ... 10 more{code}
>  
> I tried setting the CamelLinkedIn.fields header, but this leads to further 
> errors. The CXF 3.2.2 upgrade may be the culprit here. The tests run fine on 
> Camel 2.20.x with CXF 3.2.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

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

abccbaandy commented on CAMEL-12337:


sftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
change directory to: notexist
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:609)
at 
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:597)
at 
org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:108)
at 
org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2367)
at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:342)
at 
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:607)
{code}

ftp
{code:java}
org.apache.camel.component.file.GenericFileOperationFailedException: File 
operation failed: 550 The system cannot find the file specified. 
 Cannot change directory to: notexist. Code: 550
at 
org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
at 
org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
at 
org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
at 
org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
at 
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
at 
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
at 
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}


> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)

[jira] [Created] (CAMEL-12345) LinkedIn component throws IllegalArgumentException on API requests

2018-03-12 Thread James Netherton (JIRA)
James Netherton created CAMEL-12345:
---

 Summary: LinkedIn component throws IllegalArgumentException on API 
requests
 Key: CAMEL-12345
 URL: https://issues.apache.org/jira/browse/CAMEL-12345
 Project: Camel
  Issue Type: Bug
Affects Versions: 2.21.0
Reporter: James Netherton


Almost all of the camel-linkedin integration tests are failing on master and 
for the 2.21.0 tag. The error is pretty much the same for all of them. For 
example SearchResourceIntegrationTest.testSearchCompanies:

 
{code:java}
Caused by: org.apache.camel.RuntimeCamelException: Error invoking 
searchCompanies with {keywords=linkedin, fields=}: Value for fields is not 
specified
at 
org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:514)
at 
org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
at 
org.apache.camel.component.linkedin.LinkedInProducer.doInvokeMethod(LinkedInProducer.java:43)
at 
org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Value for fields is not specified
at 
org.apache.cxf.jaxrs.client.AbstractClient.convertParamValue(AbstractClient.java:824)
at 
org.apache.cxf.jaxrs.client.ClientProxyImpl.getPathParamValues(ClientProxyImpl.java:452)
at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:179)
at com.sun.proxy.$Proxy54.searchCompanies(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:506)
... 10 more{code}
 

I tried setting the CamelLinkedIn.fields header, but this leads to further 
errors. The CXF 3.2.2 upgrade may be the culprit here. The tests run fine on 
Camel 2.20.x with CXF 3.2.1.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12337:
-

Post the updated stacktrace

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread abccbaandy (JIRA)

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

abccbaandy commented on CAMEL-12337:


It just print the same message in the description

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12337) camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found

2018-03-12 Thread Claus Ibsen (JIRA)

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

Claus Ibsen commented on CAMEL-12337:
-

Can you post the stacktrace/error you have with stepwise=true. 

> camel-ftp - ignoreFileNotFoundOrPermissionError not work when folder not found
> --
>
> Key: CAMEL-12337
> URL: https://issues.apache.org/jira/browse/CAMEL-12337
> Project: Camel
>  Issue Type: Improvement
>  Components: camel-ftp, camel-sftp
>Affects Versions: 2.20.2
>Reporter: abccbaandy
>Assignee: Claus Ibsen
>Priority: Minor
> Fix For: 2.20.3, 2.21.0
>
>
> I tried something like these code, but when "notexist" folder not exist, it 
> still give me exception
> {code:java}
> sftp://testserver:22/notexist?autoCreate=false=true
> {code}
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot 
> list directory: notexist
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:650)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.doPollDirectory(SftpConsumer.java:118)
>   at 
> org.apache.camel.component.file.remote.SftpConsumer.pollDirectory(SftpConsumer.java:80)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> Caused by: com.jcraft.jsch.SftpException: No such file
>   at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2225)
>   at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2242)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1592)
>   at com.jcraft.jsch.ChannelSftp.ls(ChannelSftp.java:1553)
>   at 
> org.apache.camel.component.file.remote.SftpOperations.listFiles(SftpOperations.java:641)
>   ... 12 common frames omitted
> {code}
> ftp has the same issue.
> {code:java}
> org.apache.camel.component.file.GenericFileOperationFailedException: File 
> operation failed: 550 The system cannot find the file specified. 
>  Cannot change directory to: notexist. Code: 550
>   at 
> org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:790)
>   at 
> org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:768)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.doPollDirectory(FtpConsumer.java:112)
>   at 
> org.apache.camel.component.file.remote.FtpConsumer.pollDirectory(FtpConsumer.java:83)
>   at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:124)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
>   at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
>   at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>   at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>   at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>   at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (CAMEL-12344) upgrade json-validator

2018-03-12 Thread Andrea Cosentino (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino reassigned CAMEL-12344:


Assignee: Andrea Cosentino

> upgrade json-validator
> --
>
> Key: CAMEL-12344
> URL: https://issues.apache.org/jira/browse/CAMEL-12344
> Project: Camel
>  Issue Type: Task
>Reporter: Claus Ibsen
>Assignee: Andrea Cosentino
>Priority: Minor
> Fix For: 2.22.0
>
>
> The new release should be OSGi bundle so we can avoid the wrap



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (CAMEL-12344) upgrade json-validator

2018-03-12 Thread Claus Ibsen (JIRA)
Claus Ibsen created CAMEL-12344:
---

 Summary: upgrade json-validator
 Key: CAMEL-12344
 URL: https://issues.apache.org/jira/browse/CAMEL-12344
 Project: Camel
  Issue Type: Task
Reporter: Claus Ibsen
 Fix For: 2.22.0


The new release should be OSGi bundle so we can avoid the wrap



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


fhassak commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372216941
 
 
   By removing deprecated constructor, i can detect error at compile time 
instead of runtime.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


fhassak commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372213150
 
 
   I understand. Ok to remove deprecated constructor in 2.22.0. So, i will 
change my code to use the new constructor to avoid exception. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread Claus Ibsen (JIRA)

 [ 
https://issues.apache.org/jira/browse/CAMEL-12343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-12343.
-
   Resolution: Not A Bug
 Assignee: Claus Ibsen
Fix Version/s: 2.21.0

This is by design the code as-is

> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Assignee: Claus Ibsen
>Priority: Major
> Fix For: 2.21.0
>
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


davsclaus commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372211766
 
 
   This PR is invalid, the code should be as-is


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


davsclaus closed pull request #2252: CAMEL-12343 : refer to new constructor 
with defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
index 71c6d6b43ee..b5884b42290 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
@@ -18,6 +18,7 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Message;
+import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultMessage;
 
 /**
@@ -31,6 +32,7 @@
  */
 @Deprecated
 public GenericFileMessage() {
+this(new DefaultCamelContext());
 }
 
 public GenericFileMessage(CamelContext camelContext) {
@@ -42,7 +44,7 @@ public GenericFileMessage(CamelContext camelContext) {
  */
 @Deprecated
 public GenericFileMessage(GenericFile file) {
-this.file = file;
+this(new DefaultCamelContext(), file);
 }
 
 public GenericFileMessage(CamelContext camelContext, GenericFile file) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
index e226de0ecf8..30ad2ec43f1 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
@@ -54,6 +54,7 @@
  */
 @Deprecated
 public DefaultMessage() {
+this(new DefaultCamelContext());
 }
 
 public DefaultMessage(CamelContext camelContext) {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA

[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


Github user davsclaus closed the pull request at:

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


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372211374
 
 
   By the way, the deprecated constructors can be removed in 2.22.0, since we 
deprecated them in 2.20


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372211374
 
 
   By the way, the deprecated constructors can be removed in 2.22.0, since we 
deprecate them in 2.20


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372210309
 
 
   That's a deprecated constructor. We can fix this after the release.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


fhassak opened a new pull request #2252: CAMEL-12343 : refer to new constructor 
with defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252
 
 
   Migrate from 2.19.2 to 2.20.2 failed.
   
   ```
   java.lang.IllegalArgumentException: CamelContext must be specified on: 
Message[]
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
   ```
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


GitHub user fhassak reopened a pull request:

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

CAMEL-12343 : refer to new constructor with defaultCamelContext for 
deprecated constructor

Migrate from 2.19.2 to 2.20.2 failed.

```
java.lang.IllegalArgumentException: CamelContext must be specified on: 
Message[]
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
```

 

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

$ git pull https://github.com/fhassak/camel CAMEL-12343

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

https://github.com/apache/camel/pull/2252.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 #2252


commit fbace94ef92f41200f122884fa8ce6d32660b52c
Author: Farès Hassak 
Date:   2018-03-12T00:21:34Z

CAMEL-12343 : refer to new contructor with defaultCamelContext for 
deprecated constructor




> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372210309
 
 
   That's a deprecated method. We can fix this after the release.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


Github user oscerd closed the pull request at:

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


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd closed pull request #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
index 71c6d6b43ee..b5884b42290 100644
--- 
a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
+++ 
b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
@@ -18,6 +18,7 @@
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Message;
+import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultMessage;
 
 /**
@@ -31,6 +32,7 @@
  */
 @Deprecated
 public GenericFileMessage() {
+this(new DefaultCamelContext());
 }
 
 public GenericFileMessage(CamelContext camelContext) {
@@ -42,7 +44,7 @@ public GenericFileMessage(CamelContext camelContext) {
  */
 @Deprecated
 public GenericFileMessage(GenericFile file) {
-this.file = file;
+this(new DefaultCamelContext(), file);
 }
 
 public GenericFileMessage(CamelContext camelContext, GenericFile file) {
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java 
b/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
index e226de0ecf8..30ad2ec43f1 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
@@ -54,6 +54,7 @@
  */
 @Deprecated
 public DefaultMessage() {
+this(new DefaultCamelContext());
 }
 
 public DefaultMessage(CamelContext camelContext) {


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA

[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


fhassak commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372209726
 
 
   Same error with 2.21.0 from repository
   https://repository.apache.org/content/repositories/orgapachecamel-1103/
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (CAMEL-12343) Using DefautMessage() and GenericFileMessage() without CamelContext throw Exception

2018-03-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CAMEL-12343:


oscerd commented on issue #2252: CAMEL-12343 : refer to new constructor with 
defaultCamelContext for deprecated constructor
URL: https://github.com/apache/camel/pull/2252#issuecomment-372208275
 
 
   Lets wait for the 2.21.0 release first.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception
> ---
>
> Key: CAMEL-12343
> URL: https://issues.apache.org/jira/browse/CAMEL-12343
> Project: Camel
>  Issue Type: Bug
>  Components: camel-core
>Affects Versions: 2.20.0, 2.20.1, 2.20.2, 2.21.0
>Reporter: Farès Hassak
>Priority: Major
>
> Hello,
> I am using version 2.19.2 and try to migrate to version 2.20.2 (and then to 
> 2.21.0).
> Using DefautMessage() and GenericFileMessage() without CamelContext throw 
> Exception :
> {code:java}
> java.lang.IllegalArgumentException: CamelContext must be specified on: 
> Message[] at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:342)
> {code}
> In version 2.20.0, I see that these constructor was deprecated and new 
> contructors was introduced for this new feature 
> https://issues.apache.org/jira/browse/CAMEL-11149 :
> To remain better backward compatibility, i would suggest to refer the new 
> constructor in deprecated contructor  :
> {code:java}
>  @Deprecated
> public DefaultMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public DefaultMessage(CamelContext camelContext) {
> setCamelContext(camelContext);
> }
> {code}
> {code:java}
> @Deprecated
> public GenericFileMessage() {
> this(new DefaultCamelContext()); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext) {
> super(camelContext);
> }
> /**
>  * @deprecated use {@link #GenericFileMessage(CamelContext, GenericFile)}
>  */
> @Deprecated
> public GenericFileMessage(GenericFile file) {
> this(new DefaultCamelContext(), file); //use new contructor with 
> DefaultCamelContext to avoid exception
> }
> public GenericFileMessage(CamelContext camelContext, GenericFile file) 
> {
> super(camelContext);
> this.file = file;
> }
> {code}
> Otherwise, the deprecated constructeur must be deleted in order to detect 
> errors at compile time and not at runtime.
> Farès



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)