It is proxy issue, now I moved application out of proxy env , the problem
fixed.
but I got another error

how to set grant type in the camel salesforce configuration? I didn't see
that option for grant_type

Caused by: org.apache.camel.component.salesforce.api.SalesforceException:
{errors:[{"errorCode":"invalid_grant","message":"Login error
code:[invalid_grant] description:[authentication failure]"}],statusCode:400}

On Wed, Apr 7, 2021 at 9:54 AM Ajmera, Hemang C <hemang.ajm...@cgi.com>
wrote:

> Hi
>   For login-url please try using https://login.salesforce.com for
> production environment or https://test.salesforce.com
>
> No need to add anything extra for oauth... Salesforce component will take
> care of those.
>
> Thanks and Regards,
> Hemang Ajmera
>
>
> -----Original Message-----
> From: WEIQUAN YUAN <weiquan.y...@gmail.com>
> Sent: 05 April 2021 23:54
> To: users@camel.apache.org
> Subject: salesforce connection with camel
>
>
> EXTERNAL SENDER:   Do not click any links or open any attachments unless
> you trust the sender and know the content is safe.
> EXPÉDITEUR EXTERNE:    Ne cliquez sur aucun lien et n’ouvrez aucune pièce
> jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous
> ayez l'assurance que le contenu provient d'une source sûre.
>
> Here is my properties
>
> camel.component.salesforce.client-secret=xxx
> camel.component.salesforce.client-id=xxx
> camel.component.salesforce.authentication-type=USERNAME_PASSWORD
> camel.component.salesforce.login-url=
>
> https://urldefense.com/v3/__https://test.salesforce.com/services/oauth2/token__;!!AaIhyw!_IOZlEZxP07kluK-vgfSr9h3SzufPQRZxVXryo4w5up9MTcN-P8FPmPd_iPVZ5cj$
> camel.component.salesforce.user-name=xxx
>
> and I run this route
>
> from("timer:tick")
> .setHeader("Sforce-Limit-Info", constant("api-usage"))
> .to("salesforce:getGlobalObjects")
> .process(exchange -> {
> Message in = exchange.getIn();
> String apiLimits = in.getHeader("Sforce-Limit-Info", String.class);
> System.out.print("sales force works ? " + apiLimits);
> })
> .end();
>
>
> I think that installed all the certifcates I has below(loginURL,
> instanceURL), but still got the error
>
> "org.apache.camel.RuntimeCamelException:
> org.apache.camel.component.salesforce.api.SalesforceException: Unexpected
> login error: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target"
>
>
> There is not proxy between camel application and SF.
>
> then I injected those properties in URL as below to run in POSTman
>
>
> https://urldefense.com/v3/__https://test.salesforce.com/services/oauth2/token?client_id=XXX&format=json&client_secret=XXX&grant_type=password&username=XXXX&password=XXX__;!!AaIhyw!_IOZlEZxP07kluK-vgfSr9h3SzufPQRZxVXryo4w5up9MTcN-P8FPmPd_jFwPZN3$
>
> it successfully returns me access token, what is wrong with my local env?
> how can I debug this issue?
>
>
>
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Weiquan Yuan
> Located in Ottawa, Canada
>


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Weiquan Yuan
Located in Ottawa, Canada

Reply via email to