Salesforce not working with camel 3.2

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

Salesforce not working with camel 3.2

Ajmera, Hemang C

Hi

   I am try to use salesforce component, but getting null point exception with camel 3.2. The code is working fine with camel 3.1.

 

I did little debugging and found that in SalesforceComponent at line 260, “config.setHttpClient(httpClient);” HttpClient is set to null and later in the code httpClient is initialized at line on line 328.

 

So eventually salesforceComponent.config.httpClient is null and which is why we are getting null point exception.

 

Here is the detailed error message

 

 

  .   ____          _            __ _ _

/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot ::        (v2.2.6.RELEASE)

 

2020-04-17 15:39:44.832  INFO 18872 --- [           main] c.t.electron.fi.IntegrationApplication   : No active profile set, falling back to default profiles: default

2020-04-17 15:39:45.692  INFO 18872 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2020-04-17 15:39:45.923  INFO 18872 --- [           main] o.apache.camel.support.LRUCacheFactory   : Detected and using LURCacheFactory: camel-caffeine-lrucache

2020-04-17 15:39:46.436  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML routes from: classpath:camel/*.xml

2020-04-17 15:39:46.437  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML rests from: classpath:camel-rest/*.xml

2020-04-17 15:39:46.469  INFO 18872 --- [           main] o.a.c.i.e.DefaultManagementStrategy      : JMX is enabled

2020-04-17 15:39:46.973  INFO 18872 --- [           main] o.a.camel.component.http.HttpComponent   : Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@21a66d45

2020-04-17 15:39:47.021  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is starting

2020-04-17 15:39:47.045  INFO 18872 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @4151ms to org.eclipse.jetty.util.log.Slf4jLog

2020-04-17 15:39:47.068  INFO 18872 --- [           main] o.a.c.support.jsse.SSLContextParameters  : Available providers: SUN version 1.8.

2020-04-17 15:39:47.757  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login at Salesforce loginUrl: https://test.salesforce.com/services/oauth2/token

2020-04-17 15:39:50.118  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login successful

2020-04-17 15:39:50.118  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceComponent   : Missing property packages, getSObject* operations will NOT work without property rawPayload=true

2020-04-17 15:39:50.119  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html

2020-04-17 15:39:50.127  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceConsumer    : Property sObjectName or sObjectClass NOT set, messages will be of type java.lang.Map

2020-04-17 15:39:50.209 ERROR 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (camel-1) due to exception thrown: null

 

java.lang.NullPointerException: null

              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) [camel-spring-boot-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) [camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) [camel-spring-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) [camel-spring-3.2.0.jar:3.2.0]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na]

 

2020-04-17 15:39:50.210  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutting down

2020-04-17 15:39:51.692  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Logout successful

2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) uptime 4.711 seconds

2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutdown in 1.524 seconds

2020-04-17 15:39:51.741  INFO 18872 --- [           main] ConditionEvaluationReportLoggingListener :

 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2020-04-17 15:39:51.744 ERROR 18872 --- [           main] o.s.boot.SpringApplication               : Application run failed

 

org.apache.camel.RuntimeCamelException: java.lang.NullPointerException

              at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:124) ~[camel-spring-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) ~[camel-spring-3.2.0.jar:3.2.0]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]

              at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]

              at com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na]

Caused by: java.lang.NullPointerException: null

              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) ~[camel-spring-boot-3.2.0.jar:3.2.0]

              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]

              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) ~[camel-base-3.2.0.jar:3.2.0]

              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) ~[camel-spring-3.2.0.jar:3.2.0]

              ... 14 common frames omitted

 

 

 

 

Thanks and Regards,

Hemang Ajmera

 

Hemang C Ajmera | Technical Architect

Asia Pacific Communications, Media and Utilities Delivery Center | CGI

Block 5, DLF-SEZ, Manapakkam, Chennai – 600089, India
O: +91-44-6647-3828 | M: +91-89397-07557 | M: +91-98841-66619 | VOIP: 8083828

[hidden email] | www.cgi.com

 

Reply | Threaded
Open this post in threaded view
|

Re: Salesforce not working with camel 3.2

jbonofre
Hi,

Yes, I also identified the same issue: it works with Camel 3.0.1 and 3.1.0 but not in 3.2.0.

I created https://issues.apache.org/jira/browse/CAMEL-14927 <https://issues.apache.org/jira/browse/CAMEL-14927> to fix it as I’m also impacted.

Regards
JB

> Le 17 avr. 2020 à 12:26, Ajmera, Hemang C <[hidden email]> a écrit :
>
> Hi
>    I am try to use salesforce component, but getting null point exception with camel 3.2. The code is working fine with camel 3.1.
>  
> I did little debugging and found that in SalesforceComponent at line 260, “config.setHttpClient(httpClient);” HttpClient is set to null and later in the code httpClient is initialized at line on line 328.
>  
> So eventually salesforceComponent.config.httpClient is null and which is why we are getting null point exception.
>  
> Here is the detailed error message
>  
>  
>   .   ____          _            __ _ _
> /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
>   '  |____| .__|_| |_|_| |_\__, | / / / /
> =========|_|==============|___/=/_/_/_/
> :: Spring Boot ::        (v2.2.6.RELEASE)
>  
> 2020-04-17 15:39:44.832  INFO 18872 --- [           main] c.t.electron.fi.IntegrationApplication   : No active profile set, falling back to default profiles: default
> 2020-04-17 15:39:45.692  INFO 18872 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
> 2020-04-17 15:39:45.923  INFO 18872 --- [           main] o.apache.camel.support.LRUCacheFactory   : Detected and using LURCacheFactory: camel-caffeine-lrucache
> 2020-04-17 15:39:46.436  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML routes from: classpath:camel/*.xml
> 2020-04-17 15:39:46.437  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
> 2020-04-17 15:39:46.469  INFO 18872 --- [           main] o.a.c.i.e.DefaultManagementStrategy      : JMX is enabled
> 2020-04-17 15:39:46.973  INFO 18872 --- [           main] o.a.camel.component.http.HttpComponent   : Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@21a66d45
> 2020-04-17 15:39:47.021  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is starting
> 2020-04-17 15:39:47.045  INFO 18872 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @4151ms to org.eclipse.jetty.util.log.Slf4jLog
> 2020-04-17 15:39:47.068  INFO 18872 --- [           main] o.a.c.support.jsse.SSLContextParameters  : Available providers: SUN version 1.8.
> 2020-04-17 15:39:47.757  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login at Salesforce loginUrl: https://test.salesforce.com/services/oauth2/token <https://test.salesforce.com/services/oauth2/token>
> 2020-04-17 15:39:50.118  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login successful
> 2020-04-17 15:39:50.118  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceComponent   : Missing property packages, getSObject* operations will NOT work without property rawPayload=true
> 2020-04-17 15:39:50.119  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html <http://camel.apache.org/stream-caching.html>
> 2020-04-17 15:39:50.127  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceConsumer    : Property sObjectName or sObjectClass NOT set, messages will be of type java.lang.Map
> 2020-04-17 15:39:50.209 ERROR 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (camel-1) due to exception thrown: null
>  
> java.lang.NullPointerException: null
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) [camel-spring-boot-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) [camel-spring-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) [camel-spring-3.2.0.jar:3.2.0]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na]
>  
> 2020-04-17 15:39:50.210  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutting down
> 2020-04-17 15:39:51.692  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Logout successful
> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) uptime 4.711 seconds
> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutdown in 1.524 seconds
> 2020-04-17 15:39:51.741  INFO 18872 --- [           main] ConditionEvaluationReportLoggingListener :
>  
> Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
> 2020-04-17 15:39:51.744 ERROR 18872 --- [           main] o.s.boot.SpringApplication               : Application run failed
>  
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>               at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:124) ~[camel-spring-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) ~[camel-spring-3.2.0.jar:3.2.0]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na]
> Caused by: java.lang.NullPointerException: null
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) ~[camel-spring-boot-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) ~[camel-spring-3.2.0.jar:3.2.0]
>               ... 14 common frames omitted
>  
>  
>  
>  
> Thanks and Regards,
> Hemang Ajmera
>  
> Hemang C Ajmera | Technical Architect
> Asia Pacific Communications, Media and Utilities Delivery Center | CGI
> Block 5, DLF-SEZ, Manapakkam, Chennai – 600089, India
> O: +91-44-6647-3828 | M: +91-89397-07557 | M: +91-98841-66619 | VOIP: 8083828
> [hidden email] <mailto:[hidden email]> | www.cgi.com <http://www.cgi.com/>

Reply | Threaded
Open this post in threaded view
|

RE: Salesforce not working with camel 3.2

Ajmera, Hemang C
Hi
  Thanks for confirming the issue and creating Jira ticket. It is marked as New Feature in Jira. Shouldn’t this be a bug?


Thanks and Regards,
Hemang Ajmera

-----Original Message-----
From: Jean-Baptiste Onofre <[hidden email]>
Sent: 17 April 2020 17:07
To: [hidden email]
Subject: Re: Salesforce not working with camel 3.2

Hi,

Yes, I also identified the same issue: it works with Camel 3.0.1 and 3.1.0 but not in 3.2.0.

I created https://issues.apache.org/jira/browse/CAMEL-14927 <https://issues.apache.org/jira/browse/CAMEL-14927> to fix it as I’m also impacted.

Regards
JB

> Le 17 avr. 2020 à 12:26, Ajmera, Hemang C <[hidden email]> a écrit :
>
> Hi
>    I am try to use salesforce component, but getting null point exception with camel 3.2. The code is working fine with camel 3.1.
>  
> I did little debugging and found that in SalesforceComponent at line 260, “config.setHttpClient(httpClient);” HttpClient is set to null and later in the code httpClient is initialized at line on line 328.
>  
> So eventually salesforceComponent.config.httpClient is null and which is why we are getting null point exception.
>  
> Here is the detailed error message
>  
>  
>   .   ____          _            __ _ _
> /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/
> _` | \ \ \ \ \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
>   '  |____| .__|_| |_|_| |_\__, | / / / /
> =========|_|==============|___/=/_/_/_/
> :: Spring Boot ::        (v2.2.6.RELEASE)
>  
> 2020-04-17 15:39:44.832  INFO 18872 --- [           main] c.t.electron.fi.IntegrationApplication   : No active profile set, falling back to default profiles: default
> 2020-04-17 15:39:45.692  INFO 18872 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
> 2020-04-17 15:39:45.923  INFO 18872 --- [           main] o.apache.camel.support.LRUCacheFactory   : Detected and using LURCacheFactory: camel-caffeine-lrucache
> 2020-04-17 15:39:46.436  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML routes from: classpath:camel/*.xml
> 2020-04-17 15:39:46.437  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
> 2020-04-17 15:39:46.469  INFO 18872 --- [           main] o.a.c.i.e.DefaultManagementStrategy      : JMX is enabled
> 2020-04-17 15:39:46.973  INFO 18872 --- [           main] o.a.camel.component.http.HttpComponent   : Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@21a66d45
> 2020-04-17 15:39:47.021  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is starting
> 2020-04-17 15:39:47.045  INFO 18872 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @4151ms to org.eclipse.jetty.util.log.Slf4jLog
> 2020-04-17 15:39:47.068  INFO 18872 --- [           main] o.a.c.support.jsse.SSLContextParameters  : Available providers: SUN version 1.8.
> 2020-04-17 15:39:47.757  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login at Salesforce loginUrl: https://test.salesforce.com/services/oauth2/token <https://test.salesforce.com/services/oauth2/token>
> 2020-04-17 15:39:50.118  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login successful
> 2020-04-17 15:39:50.118  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceComponent   : Missing property packages, getSObject* operations will NOT work without property rawPayload=true
> 2020-04-17 15:39:50.119  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html <http://camel.apache.org/stream-caching.html>
> 2020-04-17 15:39:50.127  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceConsumer    : Property sObjectName or sObjectClass NOT set, messages will be of type java.lang.Map
> 2020-04-17 15:39:50.209 ERROR 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (camel-1) due to exception thrown: null
>  
> java.lang.NullPointerException: null
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) [camel-spring-boot-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) [camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) [camel-spring-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) [camel-spring-3.2.0.jar:3.2.0]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at
> com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationAp
> plication.java:10) [classes/:na]
>  
> 2020-04-17 15:39:50.210  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutting down
> 2020-04-17 15:39:51.692  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Logout successful
> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) uptime 4.711 seconds
> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutdown in 1.524 seconds
> 2020-04-17 15:39:51.741  INFO 18872 --- [           main] ConditionEvaluationReportLoggingListener :
>  
> Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
> 2020-04-17 15:39:51.744 ERROR 18872 --- [           main] o.s.boot.SpringApplication               : Application run failed
>  
> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>               at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:124) ~[camel-spring-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) ~[camel-spring-3.2.0.jar:3.2.0]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>               at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>               at
> com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na] Caused by: java.lang.NullPointerException: null
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) ~[camel-spring-boot-3.2.0.jar:3.2.0]
>               at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>               at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) ~[camel-base-3.2.0.jar:3.2.0]
>               at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) ~[camel-spring-3.2.0.jar:3.2.0]
>               ... 14 common frames omitted
>  
>  
>  
>  
> Thanks and Regards,
> Hemang Ajmera
>  
> Hemang C Ajmera | Technical Architect
> Asia Pacific Communications, Media and Utilities Delivery Center | CGI
> Block 5, DLF-SEZ, Manapakkam, Chennai – 600089, India
> O: +91-44-6647-3828 | M: +91-89397-07557 | M: +91-98841-66619 | VOIP:
> 8083828 [hidden email] <mailto:[hidden email]> |
> www.cgi.com <http://www.cgi.com/>

Reply | Threaded
Open this post in threaded view
|

Re: Salesforce not working with camel 3.2

jbonofre
Yeah, it’s a bug, I’m changing that. Thanks for spotting it.

Regards
JB

> Le 17 avr. 2020 à 14:10, Ajmera, Hemang C <[hidden email]> a écrit :
>
> Hi
>  Thanks for confirming the issue and creating Jira ticket. It is marked as New Feature in Jira. Shouldn’t this be a bug?
>
>
> Thanks and Regards,
> Hemang Ajmera
>
> -----Original Message-----
> From: Jean-Baptiste Onofre <[hidden email]>
> Sent: 17 April 2020 17:07
> To: [hidden email]
> Subject: Re: Salesforce not working with camel 3.2
>
> Hi,
>
> Yes, I also identified the same issue: it works with Camel 3.0.1 and 3.1.0 but not in 3.2.0.
>
> I created https://issues.apache.org/jira/browse/CAMEL-14927 <https://issues.apache.org/jira/browse/CAMEL-14927> to fix it as I’m also impacted.
>
> Regards
> JB
>
>> Le 17 avr. 2020 à 12:26, Ajmera, Hemang C <[hidden email]> a écrit :
>>
>> Hi
>>   I am try to use salesforce component, but getting null point exception with camel 3.2. The code is working fine with camel 3.1.
>>
>> I did little debugging and found that in SalesforceComponent at line 260, “config.setHttpClient(httpClient);” HttpClient is set to null and later in the code httpClient is initialized at line on line 328.
>>
>> So eventually salesforceComponent.config.httpClient is null and which is why we are getting null point exception.
>>
>> Here is the detailed error message
>>
>>
>>  .   ____          _            __ _ _
>> /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/
>> _` | \ \ \ \ \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
>>  '  |____| .__|_| |_|_| |_\__, | / / / /
>> =========|_|==============|___/=/_/_/_/
>> :: Spring Boot ::        (v2.2.6.RELEASE)
>>
>> 2020-04-17 15:39:44.832  INFO 18872 --- [           main] c.t.electron.fi.IntegrationApplication   : No active profile set, falling back to default profiles: default
>> 2020-04-17 15:39:45.692  INFO 18872 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.apache.camel.spring.boot.CamelAutoConfiguration' of type [org.apache.camel.spring.boot.CamelAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
>> 2020-04-17 15:39:45.923  INFO 18872 --- [           main] o.apache.camel.support.LRUCacheFactory   : Detected and using LURCacheFactory: camel-caffeine-lrucache
>> 2020-04-17 15:39:46.436  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML routes from: classpath:camel/*.xml
>> 2020-04-17 15:39:46.437  INFO 18872 --- [           main] o.a.c.s.boot.SpringBootRoutesCollector   : Loading additional Camel XML rests from: classpath:camel-rest/*.xml
>> 2020-04-17 15:39:46.469  INFO 18872 --- [           main] o.a.c.i.e.DefaultManagementStrategy      : JMX is enabled
>> 2020-04-17 15:39:46.973  INFO 18872 --- [           main] o.a.camel.component.http.HttpComponent   : Created ClientConnectionManager org.apache.http.impl.conn.PoolingHttpClientConnectionManager@21a66d45
>> 2020-04-17 15:39:47.021  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is starting
>> 2020-04-17 15:39:47.045  INFO 18872 --- [           main] org.eclipse.jetty.util.log               : Logging initialized @4151ms to org.eclipse.jetty.util.log.Slf4jLog
>> 2020-04-17 15:39:47.068  INFO 18872 --- [           main] o.a.c.support.jsse.SSLContextParameters  : Available providers: SUN version 1.8.
>> 2020-04-17 15:39:47.757  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login at Salesforce loginUrl: https://test.salesforce.com/services/oauth2/token <https://test.salesforce.com/services/oauth2/token>
>> 2020-04-17 15:39:50.118  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Login successful
>> 2020-04-17 15:39:50.118  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceComponent   : Missing property packages, getSObject* operations will NOT work without property rawPayload=true
>> 2020-04-17 15:39:50.119  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html <http://camel.apache.org/stream-caching.html>
>> 2020-04-17 15:39:50.127  WARN 18872 --- [           main] o.a.c.c.salesforce.SalesforceConsumer    : Property sObjectName or sObjectClass NOT set, messages will be of type java.lang.Map
>> 2020-04-17 15:39:50.209 ERROR 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Error starting CamelContext (camel-1) due to exception thrown: null
>>
>> java.lang.NullPointerException: null
>>              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) [camel-spring-boot-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) [camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) [camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) [camel-spring-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) [camel-spring-3.2.0.jar:3.2.0]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at
>> com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationAp
>> plication.java:10) [classes/:na]
>>
>> 2020-04-17 15:39:50.210  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutting down
>> 2020-04-17 15:39:51.692  INFO 18872 --- [           main] o.a.c.c.s.internal.SalesforceSession     : Logout successful
>> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) uptime 4.711 seconds
>> 2020-04-17 15:39:51.734  INFO 18872 --- [           main] o.a.c.impl.engine.AbstractCamelContext   : Apache Camel 3.2.0 (CamelContext: camel-1) is shutdown in 1.524 seconds
>> 2020-04-17 15:39:51.741  INFO 18872 --- [           main] ConditionEvaluationReportLoggingListener :
>>
>> Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
>> 2020-04-17 15:39:51.744 ERROR 18872 --- [           main] o.s.boot.SpringApplication               : Application run failed
>>
>> org.apache.camel.RuntimeCamelException: java.lang.NullPointerException
>>              at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:124) ~[camel-spring-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) ~[camel-spring-3.2.0.jar:3.2.0]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) ~[spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
>>              at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
>>              at
>> com.teliacompany.electron.fi.IntegrationApplication.main(IntegrationApplication.java:10) [classes/:na] Caused by: java.lang.NullPointerException: null
>>              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:343) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:111) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.component.salesforce.SalesforceConsumer.doStart(SalesforceConsumer.java:320) ~[camel-salesforce-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.startService(AbstractCamelContext.java:3056) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRouteConsumers(AbstractCamelContext.java:3394) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartRouteConsumers(AbstractCamelContext.java:3325) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.safelyStartRouteServices(AbstractCamelContext.java:3230) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartOrResumeRoutes(AbstractCamelContext.java:2992) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2790) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2643) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2606) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) ~[camel-spring-boot-3.2.0.jar:3.2.0]
>>              at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.2.0.jar:3.2.0]
>>              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2448) ~[camel-base-3.2.0.jar:3.2.0]
>>              at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) ~[camel-spring-3.2.0.jar:3.2.0]
>>              ... 14 common frames omitted
>>
>>
>>
>>
>> Thanks and Regards,
>> Hemang Ajmera
>>
>> Hemang C Ajmera | Technical Architect
>> Asia Pacific Communications, Media and Utilities Delivery Center | CGI
>> Block 5, DLF-SEZ, Manapakkam, Chennai – 600089, India
>> O: +91-44-6647-3828 | M: +91-89397-07557 | M: +91-98841-66619 | VOIP:
>> 8083828 [hidden email] <mailto:[hidden email]> |
>> www.cgi.com <http://www.cgi.com/>
>