Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-931

Box component - getting all collaborations returns empty list

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 2.14.0.redhat-62-xx
    • 2.14.0.redhat-62-xx
    • None
    • None

      I am not really sure if this is bug or just problem with box and its representation of collaborations. I created two collaborations with fake email without account on the folder and they have status "Pending invitation" on the web. Using box component I call something like this:

       
      final Map<String, Object> headers = new HashMap<String, Object>(); 
      final BoxGetAllCollabsRequestObject collabRequest = BoxGetAllCollabsRequestObject.getAllCollaborationsRequestObject(BoxCollaboration.STATUS_PENDING); headers.put("operation", "getAll");
      List result = template.requestBodyAndHeaders("direct:collab",collabRequest, headers, List.class); 
      

      The returned list is not null but it is empty. Which seems like a problem because I can see both collaborations in webUI. I also tried creating collaboration with real account and afterwards getting all collaborations but BoxCollaboration.STATUS_PENDING returned empty asi it should because created collaboration is listed as accepeted. So I changed status to BoxCollaboration.STATUS_ACCEPTED, but camel throws this exception:

       testGetAllCollab(org.jboss.fuse.qa.box.component.endpoints.CollabTest) Time elapsed: 10.616 sec <<< ERROR! org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: com.box.boxjavalibv2.requests.requestobjects.BoxGetAllCollabsRequestObject@2fdab8e4] 
           at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1380) 
            at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:622)      
            at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:471) 
            at org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:264) 
            at org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:313)
            at org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:309) 
            at org.apache.camel.impl.DefaultProducerTemplate.requestBodyAndHeaders(DefaultProducerTemplate.java:346) 
            at org.jboss.fuse.qa.box.component.endpoints.CollabTest.testGetAllCollab(CollabTest.java:118)
      Caused by: org.apache.camel.RuntimeCamelException: Error invoking getAllCollaborations with {sharedLink=https://app.box.com/s/2wpu78ma6uvoixjvujrd, getAllCollabsRequest=com.box.boxjavalibv2.requests.requestobjects.BoxGetAllCollabsRequestObject@2fdab8e4}: Query parameter status=Pending is missing 
            at org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:468) 
            at org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120)
            at org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) 
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) 
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
            at java.lang.Thread.run(Thread.java:745) 
      Caused by: com.box.boxjavalibv2.exceptions.BoxServerException: Query parameter status=Pending is missing
            at com.box.boxjavalibv2.resourcemanagers.AbstractBoxResourceManager.tryCastObject(AbstractBoxResourceManager.java:130)
            at com.box.boxjavalibv2.resourcemanagers.AbstractBoxResourceManager.getResponseAndParseAndTryCast(AbstractBoxResourceManager.java:109)
            at com.box.boxjavalibv2.resourcemanagers.BoxCollaborationsManagerImpl.getAllCollaborations(BoxCollaborationsManagerImpl.java:75) 
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
            at java.lang.reflect.Method.invoke(Method.java:606) 
            at org.apache.camel.util.component.ApiMethodHelper.invokeMethod(ApiMethodHelper.java:461) 
            at org.apache.camel.util.component.AbstractApiProducer.doInvokeMethod(AbstractApiProducer.java:120) 
            at org.apache.camel.util.component.AbstractApiProducer$1.run(AbstractApiProducer.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) 
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745) 

      Which seems as a bug too.

            dbokde Dhiraj Bokde
            rjakubco Roman Jakubco (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: