Yes, I add this line  camel.component.salesforce.http-proxy-secure = false
(because true is the default value) , but I still got the same error

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint: salesforce://getGlobalObjects due to: Cannot auto create
component: salesforce
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:753)
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:80)
at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:227)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:122)
at
org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
at
org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
at
org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:569)
at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:530)
at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:240)
at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1349)
... 27 common frames omitted
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create
component: salesforce
at
org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:484)
at
org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:445)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:696)
... 37 common frames omitted
Caused by: org.apache.camel.component.salesforce.api.SalesforceException:
Unexpected login error: Unrecognized SSL message, plaintext connection?
at
org.apache.camel.component.salesforce.internal.SalesforceSession.login(SalesforceSession.java:137)
at
org.apache.camel.component.salesforce.internal.SalesforceSession.start(SalesforceSession.java:353)
at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:75)
at
org.apache.camel.component.salesforce.SalesforceComponent.doStart(SalesforceComponent.java:359)
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:72)
at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3709)
at
org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:478)
... 39 common frames omitted
Caused by: javax.net.ssl.SSLHandshakeException: Unrecognized SSL message,
plaintext connection?
at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.handshakeFailed(SslConnection.java:933)
at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:793)
at
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:159)
at
org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:75)
at
org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133)
at
org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:156)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at
org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:543)
at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:398)
at
org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at
org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:135)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Thread.java:748)

On Sat, Apr 10, 2021 at 3:27 AM Ajmera, Hemang C <hemang.ajm...@cgi.com>
wrote:

> Hi
>    I think since proxy is on port 80, mostly it is not secured. You need
> to use false for secure.
>
>
> Thanks and Regards,
> Hemang Ajmera
>
>
> -----Original Message-----
> From: WEIQUAN YUAN <weiquan.y...@gmail.com>
> Sent: 09 April 2021 23:41
> To: users@camel.apache.org
> Subject: Re: 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.
>
> WEIQUAN YUAN14:10
>
>
>
> Yes, I added configration here
> camel.component.salesforce.http-proxy-host=cdhwg01.prod.prv
> camel.component.salesforce.http-proxy-port=80
> camel.component.salesforce.http-proxy-secure = true but it gves me this
> error
>
> Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext
> connection?
> at
>
> sun.security.ssl.SSLEngineInputRecord.bytesInCompletePacket(SSLEngineInputRecord.java:146)
> at
>
> sun.security.ssl.SSLEngineInputRecord.bytesInCompletePacket(SSLEngineInputRecord.java:64)
> at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:475)
> at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:398)
> at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:377)
> at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:626)
> at org.eclipse.jetty.io.ssl.SslConnection.unwrap(SslConnection.java:417)
> at
>
> org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.fill(SslConnection.java:705)
>
> On Fri, Apr 9, 2021 at 1:00 PM Jeremy Ross <jeremy.g.r...@gmail.com>
> wrote:
>
> > You don't have to specify grant_type. Your authentication failed. If
> > you're using password auth, make sure your password is actually
> > password+API token.
> >
> > On Thu, Apr 8, 2021 at 10:49 AM WEIQUAN YUAN <weiquan.y...@gmail.com>
> > wrote:
> >
> > > 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://urldefense.com/v3/__https://login.salesforce.com__;!!AaIhy
> > > > w!90D1GG5HePOz1cTEl9LRi5gFxuKsHbsm2-amafLiGAIE_pF8Tbyz6yqXwuC2w44N
> > > > $  for production environment or
> > > > https://urldefense.com/v3/__https://test.salesforce.com__;!!AaIhyw
> > > > !90D1GG5HePOz1cTEl9LRi5gFxuKsHbsm2-amafLiGAIE_pF8Tbyz6yqXwjAp69Ky$
> > > >
> > > > 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/oauth
> > 2/token__;!!AaIhyw!_IOZlEZxP07kluK-vgfSr9h3SzufPQRZxVXryo4w5up9MTcN-P8
> > FPmPd_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/oauth
> > 2/token?client_id=XXX&format=json&client_secret=XXX&grant_type=passwor
> > d&username=XXXX&password=XXX__;!!AaIhyw!_IOZlEZxP07kluK-vgfSr9h3SzufPQ
> > RZxVXryo4w5up9MTcN-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
> > >
> >
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Weiquan Yuan
> Located in Ottawa, Canada
>


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

Reply via email to