camel-salesforce - Subscription fails with a org.cometd.common.TransportException: {httpCode=500}

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

camel-salesforce - Subscription fails with a org.cometd.common.TransportException: {httpCode=500}

Gerald Kallas - mailbox.org
Hi all,

I've following route

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
        xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">

        <bean id="salesforce" class="org.apache.camel.component.salesforce.SalesforceComponent">
                <property name="loginUrl" value="https://test.salesforce.com"></property>
        <property name="clientId" value="xxx"/>
        <property name="clientSecret" value="xxx"/>
        <property name="userName" value="xxx"/>
        <property name="password" value="xxx"/>
        </bean>

        <camelContext xmlns="http://camel.apache.org/schema/blueprint" streamCache="true" useBreadcrumb="true">

                <route>
                        <from uri="salesforce:data/AccountChangeEvent?replayId=-1" />
                        <log message="body: ${in.body}" />
                </route>

        </camelContext>

</blueprint>

The start always fails with (see below). Other Salesforce API calls with same setup are working well. Any ideas?

2020-04-23T09:42:11,817 | DEBUG | SalesforceHttpClient@4e186e77-171 | 511072ca                         | 57 - cometd-java-client - 4.0.4 | Messages failed [{clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent}]
org.cometd.common.TransportException: {httpCode=500}
        at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:254) [!/:4.0.4]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:444) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:390) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1139) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1498) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [!/:9.4.20.v20190813]
        at java.lang.Thread.run(Unknown Source) [?:?]
2020-04-23T09:42:11,819 | DEBUG | SalesforceHttpClient@4e186e77-171 | 511072ca                         | 57 - cometd-java-client - 4.0.4 | Failing {clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent}
2020-04-23T09:42:11,820 | DEBUG | SalesforceHttpClient@4e186e77-171 | SubscriptionHelper               | 130 - org.apache.camel.camel-salesforce - 3.0.0 | [CHANNEL:META_SUBSCRIBE]: {failure={exception=org.cometd.common.TransportException: {httpCode=500}, message={clientId=xxx, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent}, httpCode=500, connectionType=long-polling}, channel=/meta/subscribe, id=228, subscription=/data/AccountChangeEvent, successful=false}
2020-04-23T09:42:11,825 | WARN  | SalesforceHttpClient@4e186e77-171 | SalesforceConsumer               | 134 - org.apache.camel.camel-support - 3.0.0 | Error subscribing to data/AccountChangeEvent: {httpCode=500}. Caused by: [org.apache.camel.component.salesforce.api.SalesforceException - Error subscribing to data/AccountChangeEvent: {httpCode=500}]
org.apache.camel.component.salesforce.api.SalesforceException: Error subscribing to data/AccountChangeEvent: {httpCode=500}
        at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$7.onMessage(SubscriptionHelper.java:440) [!/:3.0.0]
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyOnMessage(AbstractClientSession.java:583) [!/:4.0.4]
        at org.cometd.common.AbstractClientSession$AbstractSessionChannel.notifyMessageListeners(AbstractClientSession.java:568) [!/:4.0.4]
        at org.cometd.common.AbstractClientSession.notifyListeners(AbstractClientSession.java:308) [!/:4.0.4]
        at org.cometd.common.AbstractClientSession.lambda$receive$4(AbstractClientSession.java:269) [!/:4.0.4]
        at org.cometd.bayeux.Promise$2.succeed(Promise.java:103) [!/:4.0.4]
        at org.cometd.common.AsyncFoldLeft$AbstractLoop.run(AsyncFoldLeft.java:199) [!/:4.0.4]
        at org.cometd.common.AsyncFoldLeft.run(AsyncFoldLeft.java:93) [!/:4.0.4]
        at org.cometd.common.AbstractClientSession.extendIncoming(AbstractClientSession.java:103) [!/:4.0.4]
        at org.cometd.common.AbstractClientSession.receive(AbstractClientSession.java:263) [!/:4.0.4]
        at org.cometd.client.BayeuxClient.failMessage(BayeuxClient.java:810) [!/:4.0.4]
        at org.cometd.client.BayeuxClient.messageFailure(BayeuxClient.java:806) [!/:4.0.4]
        at org.cometd.client.BayeuxClient.messagesFailure(BayeuxClient.java:659) [!/:4.0.4]
        at org.cometd.client.BayeuxClient$MessageTransportListener.onFailure(BayeuxClient.java:1266) [!/:4.0.4]
        at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:255) [!/:4.0.4]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:198) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:190) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:444) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:390) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1139) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1498) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:154) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [!/:9.4.20.v20190813]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [!/:9.4.20.v20190813]
        at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: org.cometd.common.TransportException: {httpCode=500}
        at org.cometd.client.transport.LongPollingTransport$2.onComplete(LongPollingTransport.java:254) ~[!/:4.0.4]
        ... 27 more