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

Claus Ibsen commented on CAMEL-12176:
-------------------------------------

Maybe you cannot use the root path for remotePath. I have added the caused 
exception in the stacktrace in the future so you can see the error from dropbox 
itself.

The doc has been fixed also.

> Camel-Dropbox /search and /get are not working
> ----------------------------------------------
>
>                 Key: CAMEL-12176
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12176
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-dropbox
>    Affects Versions: 2.20.1
>            Reporter: Kamil
>            Priority: Major
>             Fix For: 2.20.3, 2.21.0
>
>
> First of all, 
> [documentation|https://github.com/apache/camel/blob/master/components/camel-dropbox/src/main/docs/dropbox-component.adoc]
>  states that "query" property in "search" operation is not mandatory, but:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/&accessToken={{dropbox.key}}"){code}
> throws:
> {code:java}
> java.lang.IllegalArgumentException: Required value for 'query' is null
>  at com.dropbox.core.v2.files.SearchArg.<init>(SearchArg.java:59) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at com.dropbox.core.v2.files.SearchArg.<init>(SearchArg.java:93) 
> ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> com.dropbox.core.v2.files.DbxUserFilesRequests.search(DbxUserFilesRequests.java:2416)
>  ~[dropbox-core-sdk-3.0.4.jar:na]
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:270)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]{code}
> On the other hand, when I put query=* like this:
> {code:java}
> from("direct:dropboxSearch").to("dropbox://search?remotePath=/&query=*&accessToken={{dropbox.key}}"){code}
> it throws:
> {code:java}
> org.apache.camel.component.dropbox.util.DropboxException: / does not exist or 
> can't obtain metadata
>  at 
> org.apache.camel.component.dropbox.core.DropboxAPIFacade.search(DropboxAPIFacade.java:283)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.dropbox.integration.producer.DropboxSearchProducer.process(DropboxSearchProducer.java:43)
>  ~[camel-dropbox-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) 
> ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
>  ~[camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:186)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.processor.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:541) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:369) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:506) 
> [camel-core-2.20.1.jar:2.20.1]
>  at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:229) 
> [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:144)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:161)
>  [camel-core-2.20.1.jar:2.20.1]
>  at 
> org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:370)
>  [camel-core-2.20.1.jar:2.20.1]
>  
> {code}
>  
> Additionally, the same exception is thrown when I try to download *anything* 
> using:
> {code:java}
> from("direct:dropboxGet")
>  .to("dropbox://get?remotePath=/&accessToken={{dropbox.key}}");{code}
>  
> Dropbox:put is working without any problems...



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

Reply via email to