Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12176

Camel-Dropbox /search and /get are not working

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.20.1
    • Fix Version/s: 2.20.3, 2.21.0
    • Component/s: camel-dropbox
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      First of all, documentation states that "query" property in "search" operation is not mandatory, but:

      from("direct:dropboxSearch").to("dropbox://search?remotePath=/&accessToken={{dropbox.key}}")

      throws:

      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]

      On the other hand, when I put query=* like this:

      from("direct:dropboxSearch").to("dropbox://search?remotePath=/&query=*&accessToken={{dropbox.key}}")

      it throws:

      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]
       
      

       

      Additionally, the same exception is thrown when I try to download anything using:

      from("direct:dropboxGet")
       .to("dropbox://get?remotePath=/&accessToken={{dropbox.key}}");

       

      Dropbox:put is working without any problems...

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              eximius Kamil
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: