Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7401

not able to perform upsert operation using camel-salesforce component

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: jboss-fuse-6.3, fuse-7.0
    • Fix Version/s: jboss-fuse-6.3
    • Component/s: Camel
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1. Import the attached maven project
      2. Provide salesforce configuration details like: username, password, clientId and clientsecret in blueprint.xml and pom.xml
      3. Build the project
      4. Right click on blueprint.xml anf Run As -> Local Camel Context (without tests)

      Show
      1. Import the attached maven project 2. Provide salesforce configuration details like: username, password, clientId and clientsecret in blueprint.xml and pom.xml 3. Build the project 4. Right click on blueprint.xml anf Run As -> Local Camel Context (without tests)

      Description

      The following exception is thrown while using salesforce:upsertSObject method.

      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId ProcessorId Processor Elapsed (ms)
      [_Route:SalesforceU] [_Route:SalesforceU] [timer://foo?repeatCount=1 ] [ 970]
      [_Route:SalesforceU] [_bean:DbtoSalesfor] [bean[ref:sfdcupsert method:getProgramMaster] ] [ 85]
      [_Route:SalesforceU] [_log:salesforceupd] [log ] [ 0]
      [_Route:SalesforceU] [_to:salesforceupda] [salesforce:upsertSObject?sObjectIdName=Name ] [ 876]

      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------

      {message:'Error parsing JSON response: *Can not deserialize instance of org.apache.camel.component.salesforce.api.dto.CreateSObjectResult out of START_ARRAY token* at [Source: java.io.ByteArrayInputStream@6b28388b; line: 1, column: 1]',statusCode:0}

      at org.apache.camel.component.salesforce.internal.processor.JsonRestProcessor.processResponse(JsonRestProcessor.java:172)
      at org.apache.camel.component.salesforce.internal.processor.AbstractRestProcessor$11.onResponse(AbstractRestProcessor.java:386)
      at org.apache.camel.component.salesforce.internal.client.DefaultRestClient$DelegatingClientCallback.onResponse(DefaultRestClient.java:454)
      at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:178)
      at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
      at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
      at org.eclipse.jetty.client.ResponseNotifier.forwardSuccessComplete(ResponseNotifier.java:220)
      at org.apache.camel.component.salesforce.internal.client.SalesforceSecurityHandler$SecurityListener.forwardSuccessComplete(SalesforceSecurityHandler.java:252)
      at org.apache.camel.component.salesforce.internal.client.SalesforceSecurityHandler$SecurityListener.onComplete(SalesforceSecurityHandler.java:177)
      at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:193)
      at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:185)
      at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:454)
      at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:401)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:266)
      at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1488)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1246)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:156)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:117)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:69)
      at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:89)
      at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:123)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:745)

      Caused by: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of org.apache.camel.component.salesforce.api.dto.CreateSObjectResult out of START_ARRAY token
      at [Source: java.io.ByteArrayInputStream@6b28388b; line: 1, column: 1]
      at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
      at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219)
      at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212)
      at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromArray(BeanDeserializer.java:875)
      at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:597)
      at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732)
      at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1909)
      at org.apache.camel.component.salesforce.internal.processor.JsonRestProcessor.processResponse(JsonRestProcessor.java:153)
      ... 24 more
      ---------------------------------------------------------------------------------------------------------------------------------------

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jpoth John Poth
                Reporter:
                rhn-support-rakulkar Rajani Kulkarni
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: