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

camel-salesforce - Limits can not be deserialized in API versions >= 41.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.20.1, 2.20.2, 2.21.0
    • 2.22.0
    • camel-salesforce
    • None
    • Unknown

    Description

      Starting with Salesforce REST API 41.0, it appears that they have made a breaking change to the Limits json payload.  Jackson can no longer deserialize.

       

      Error is

      2018-04-11T13:02:45.644-0500 ERROR [dispatcherServlet] http-nio-8080-exec-3 [] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-isdv183994l-containerstore-com-1523469717836-0-13]] with root cause
      com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize Map key of type org.apache.camel.component.salesforce.api.dto.Limits$Operation from String "PermissionSets": not a valid representation, problem: (com.fasterxml.jackson.databind.exc.InvalidFormatException) Can not deserialize Map key of type org.apache.camel.component.salesforce.api.dto.Limits$Operation from String "PermissionSets": not one of values excepted for Enum class: [DailyApiRequests, DailyDurableGenericStreamingApiEvents, ConcurrentAsyncGetReportInstances, DailyGenericStreamingApiEvents, DailyStreamingApiEvents, DailyWorkflowEmails, HourlyDashboardStatuses, HourlySyncReportRuns, DataStorageMB, SingleEmail, HourlyTimeBasedWorkflow, ConcurrentSyncReportRuns, DurableStreamingApiConcurrentClients, DailyBulkApiRequests, FileStorageMB, DailyAsyncApexExecutions, MassEmail, StreamingApiConcurrentClients, HourlyDashboardResults, HourlyAsyncReportRuns, HourlyDashboardRefreshes, HourlyODataCallout, DailyDurableStreamingApiEvents]
      at [Source: java.io.ByteArrayInputStream@215469a9; line: 1, column: 6646]
      at [Source: java.io.ByteArrayInputStream@215469a9; line: 1, column: 6646]
      at com.fasterxml.jackson.databind.exc.InvalidFormatException.from(InvalidFormatException.java:74)
      at com.fasterxml.jackson.databind.DeserializationContext.weirdKeyException(DeserializationContext.java:1389)
      at com.fasterxml.jackson.databind.DeserializationContext.handleWeirdKey(DeserializationContext.java:880)
      at com.fasterxml.jackson.databind.deser.std.StdKeyDeserializer.deserializeKey(StdKeyDeserializer.java:130)
      at com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBind(MapDeserializer.java:445)
      at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:365)
      at com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:27)
      at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:3786)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2139)
      at com.fasterxml.jackson.core.JsonParser.readValueAs(JsonParser.java:1650)
      at org.apache.camel.component.salesforce.api.dto.Limits$LimitsDeserializer.deserialize(Limits.java:55)
      at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3814)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2924)
      at org.apache.camel.component.salesforce.internal.processor.JsonRestProcessor.processResponse(JsonRestProcessor.java:197)
      at org.apache.camel.component.salesforce.internal.processor.AbstractRestProcessor.lambda$processWithResponseCallback$5(AbstractRestProcessor.java:783)
      at org.apache.camel.component.salesforce.internal.client.DefaultRestClient$DelegatingClientCallback.onResponse(DefaultRestClient.java:502)
      at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onComplete(AbstractClientBase.java:235)
      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:459)
      at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:405)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:297)
      at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1068)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1393)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:170)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:131)
      at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:70)
      at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:130)
      at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:116)
      at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
      at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:289)
      at org.eclipse.jetty.io.ssl.SslConnection$3.succeeded(SslConnection.java:149)
      at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
      at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
      at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
      at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
      at java.lang.Thread.run(Thread.java:748)
      2018-04-11T13:14:21.737-0500 WARN SubscriptionHelper HttpClient@2040015820-scheduler [] Connect failure: {failure={exception=java.util.concurren

      Attachments

        Activity

          People

            zregvart Zoran Regvart
            clromack Chris Romack
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: