Re: camel-salesforce

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: camel-salesforce

contactreji
Create a java keystore file, import the certificate into it and pass the
file along as jvm option. Refer
https://stackoverflow.com/questions/8980364/how-do-i-find-out-what-keystore-my-jvm-is-using
where
author shows how to pass a keystore as jvm option.

By default, it tries to pick up the cacerts file in your jre folder.

Cheers
Reji

On Mon, Apr 20, 2020 at 7:38 PM Gerald Kallas <[hidden email]> wrote:

> Dear community,
>
> while connecting to a salesforce instance I'm getting an error
>
> java.lang.RuntimeException:
> 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
>
> I'm assuming that I need to add the cert from the salesforce instance
> somewhere in the config ("keystore"?) but I'm missing the configuration and
> blueprint syntax details.
>
> Any help is highly appreciated.
>
> The route looks like
>
> <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="loginConfig">
>             <bean
> class="org.apache.camel.component.salesforce.SalesforceLoginConfig">
>                 <property name="loginUrl" value="
> https://test.salesforce.com/"/>
>                 <property name="clientId" value="xxx"/>
>                 <property name="clientSecret" value="xxx"/>
>                 <property name="userName" value="xxx"/>
>                 <property name="password" value="xxx"/>
>                 <property name="lazyLogin" value="true"/>
>             </bean>
>         </property>
>     </bean>
>
>     <camelContext id="salesforceTest" xmlns="
> http://camel.apache.org/schema/blueprint" streamCache="true">
>         <route>
>             <from uri="timer:test?repeatCount=1"/>
>             <to uri="direct:salesforceTest"/>
>         </route>
>         <route>
>             <from uri="direct:salesforceTest"/>
>             <to uri="salesforce:limits"/>
>             <log message="${body}"/>
>         </route>
>     </camelContext>
>
> </blueprint>
>
> Tx in advance
> - Gerald
>
Reji Mathews Sr. Engineer - Middleware Integrations / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB ) LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a Twitter - reji_mathews
Reply | Threaded
Open this post in threaded view
|

Re: camel-salesforce

Gerald Kallas - mailbox.org
Works like a charm, thanks!

It was needed to add 3 different certs to the truststore and finally I got a valid response.

I wonder if there's another way to specify the the truststore reference?

Best
- Gerald

> Reji Mathews <[hidden email]> hat am 21. April 2020 02:55 geschrieben:
>
>  
> Create a java keystore file, import the certificate into it and pass the
> file along as jvm option. Refer
> https://stackoverflow.com/questions/8980364/how-do-i-find-out-what-keystore-my-jvm-is-using
> where
> author shows how to pass a keystore as jvm option.
>
> By default, it tries to pick up the cacerts file in your jre folder.
>
> Cheers
> Reji
>
> On Mon, Apr 20, 2020 at 7:38 PM Gerald Kallas <[hidden email]> wrote:
>
> > Dear community,
> >
> > while connecting to a salesforce instance I'm getting an error
> >
> > java.lang.RuntimeException:
> > 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
> >
> > I'm assuming that I need to add the cert from the salesforce instance
> > somewhere in the config ("keystore"?) but I'm missing the configuration and
> > blueprint syntax details.
> >
> > Any help is highly appreciated.
> >
> > The route looks like
> >
> > <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="loginConfig">
> >             <bean
> > class="org.apache.camel.component.salesforce.SalesforceLoginConfig">
> >                 <property name="loginUrl" value="
> > https://test.salesforce.com/"/>
> >                 <property name="clientId" value="xxx"/>
> >                 <property name="clientSecret" value="xxx"/>
> >                 <property name="userName" value="xxx"/>
> >                 <property name="password" value="xxx"/>
> >                 <property name="lazyLogin" value="true"/>
> >             </bean>
> >         </property>
> >     </bean>
> >
> >     <camelContext id="salesforceTest" xmlns="
> > http://camel.apache.org/schema/blueprint" streamCache="true">
> >         <route>
> >             <from uri="timer:test?repeatCount=1"/>
> >             <to uri="direct:salesforceTest"/>
> >         </route>
> >         <route>
> >             <from uri="direct:salesforceTest"/>
> >             <to uri="salesforce:limits"/>
> >             <log message="${body}"/>
> >         </route>
> >     </camelContext>
> >
> > </blueprint>
> >
> > Tx in advance
> > - Gerald
> >