[
https://issues.apache.org/jira/browse/CAMEL-19161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17746399#comment-17746399
]
Claus Ibsen commented on CAMEL-19161:
-------------------------------------
Any update on this ticket?
> camel-salesforce - Connection issue when using lazy login
> ---------------------------------------------------------
>
> Key: CAMEL-19161
> URL: https://issues.apache.org/jira/browse/CAMEL-19161
> Project: Camel
> Issue Type: Bug
> Components: camel-salesforce
> Affects Versions: 3.11.1
> Reporter: Nicolas Filotto
> Priority: Minor
> Fix For: 3.21.1, 4.0.0
>
>
> When we enable lazy login, we end up with an exception of type:
> {noformat}
> 2023-03-16 16:49:40,743 [main ] WARN SalesforceComponent
> - Missing property packages, getSObject* operations will NOT work without
> property rawPayload=true
> 2023-03-16 16:49:53,432 [main ] INFO SalesforceSession
> - Login at Salesforce loginUrl:
> https://login.salesforce.com/services/oauth2/token
> 2023-03-16 16:50:28,009 [main ] INFO SalesforceSession
> - Login successful
> 2023-03-16 16:50:33,456 [forceHttpClient] WARN SubscriptionHelper
> - Handshake failure: {failure={exception=java.lang.IllegalArgumentException:
> Invalid protocol null, message={ext={replay=true},
> supportedConnectionTypes=[long-polling], channel=/meta/handshake, id=1,
> version=1.0}, connectionType=long-polling}, channel=/meta/handshake, id=1,
> successful=false}
> 2023-03-16 16:50:33,457 [forceHttpClient] INFO SubscriptionHelper
> - Handshaking after unexpected disconnect from Salesforce...
> 2023-03-16 16:50:57,019 [forceHttpClient] WARN SubscriptionHelper
> - Handshake failure: {failure={exception=java.lang.IllegalArgumentException:
> Invalid protocol null, message={ext={replay=true},
> supportedConnectionTypes=[long-polling], channel=/meta/handshake, id=2,
> version=1.0}, connectionType=long-polling}, channel=/meta/handshake, id=2,
> successful=false}
> 2023-03-16 16:51:00,769 [forceHttpClient] WARN SubscriptionHelper
> - Handshake failure: {failure={exception=java.lang.IllegalArgumentException:
> Invalid protocol null, message={ext={replay=true},
> supportedConnectionTypes=[long-polling], channel=/meta/handshake, id=3,
> version=1.0}, connectionType=long-polling}, channel=/meta/handshake, id=3,
> successful=false}
> {noformat}
> After a deeper investigation, it is due to the fact that when [creating the
> {{BayeuxClient}} during
> startup|https://github.com/apache/camel/blob/main/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelper.java#L405],
> it calls {{component.getSession().getInstanceUrl()}} to build the Url used
> by the client to connect but the instance Url is null as long as it not
> connected.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)