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

Salesforce component doesn't properly retries the request when doing re-login

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.2, 2.15.0
    • Fix Version/s: 2.14.3, 2.15.2, 2.16.0
    • Component/s: camel-salesforce
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Estimated Complexity:
      Unknown

      Description

      When the authentication token is revoked by other means then using SalesforceSession.logout(), it's unable (in most cases) to properly retry the original request.

      The exception follows.

      org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]]
      	at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1380)
      	at org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:623)
      	at org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:471)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:133)
      	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
      	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:301)
      	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:331)
      	at org.apache.camel.component.salesforce.RestApiIntegrationTest.doTestGetGlobalObjects(RestApiIntegrationTest.java:136)
      	at org.apache.camel.component.salesforce.RestApiIntegrationTest.testRetry(RestApiIntegrationTest.java:89)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
      	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      Caused by: {message:'Unexpected exception: Response not received yet',statusCode:0}
      	at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onException(AbstractClientBase.java:135)
      	at org.eclipse.jetty.client.HttpEventListenerWrapper.onException(HttpEventListenerWrapper.java:94)
      	at org.eclipse.jetty.client.RedirectListener.onException(RedirectListener.java:210)
      	at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:168)
      	at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.IllegalStateException: Response not received yet
      	at org.eclipse.jetty.client.CachedExchange.getResponseStatus(CachedExchange.java:47)
      	at org.apache.camel.component.salesforce.internal.client.AbstractClientBase$1.onResponseComplete(AbstractClientBase.java:149)
      	at org.eclipse.jetty.client.HttpEventListenerWrapper.onResponseComplete(HttpEventListenerWrapper.java:123)
      	at org.eclipse.jetty.client.RedirectListener.onResponseComplete(RedirectListener.java:106)
      	at org.eclipse.jetty.client.HttpExchange.setStatus(HttpExchange.java:305)
      	at org.eclipse.jetty.client.AbstractHttpConnection$Handler.messageComplete(AbstractHttpConnection.java:340)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:904)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      	at org.eclipse.jetty.client.AsyncHttpConnection.handle(AsyncHttpConnection.java:135)
      	... 6 more
      

        Attachments

          Activity

            People

            • Assignee:
              dhirajsb Dhiraj Bokde
              Reporter:
              pingw33n Dmitry Lysai
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: