You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/01/10 07:48:00 UTC

[jira] [Work logged] (CAMEL-14387) Null pointer exception when restart client in SubscriptionHelper

     [ https://issues.apache.org/jira/browse/CAMEL-14387?focusedWorklogId=369677&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-369677 ]

ASF GitHub Bot logged work on CAMEL-14387:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jan/20 07:47
            Start Date: 10/Jan/20 07:47
    Worklog Time Spent: 10m 
      Work Description: jbdefard commented on pull request #3473: CAMEL-14387 - fix NPE when client error
URL: https://github.com/apache/camel/pull/3473
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 369677)
    Remaining Estimate: 0h
            Time Spent: 10m

> Null pointer exception when restart client in SubscriptionHelper
> ----------------------------------------------------------------
>
>                 Key: CAMEL-14387
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14387
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>    Affects Versions: 3.0.0.RC3, 3.0.0
>            Reporter: Jean-Baptiste Defard
>            Priority: Critical
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When attempt to restart Cometd client, the component throw NPE:
> 2019-11-21 13:11:47.200 INFO 1 --- [SalesforceHttpClient@3991fe6d-14724] o.a.c.c.s.i.s.SubscriptionHelper : Restarting on unexpected disconnect from Salesforce...
> 2019-11-21 13:11:47.200 DEBUG 1 --- [SalesforceHttpClient@3991fe6d-14724] o.a.c.c.s.i.s.SubscriptionHelper : Waiting to disconnect...
> 2019-11-21 13:11:52.201 DEBUG 1 --- [SalesforceHttpClient@3991fe6d-14724] o.a.c.c.s.i.s.SubscriptionHelper : Pausing for 0 msecs before restart attempt
> 2019-11-21 13:11:52.201 INFO 1 --- [SalesforceHttpClient@3991fe6d-14724] o.a.c.c.s.internal.SalesforceSession : Login at Salesforce loginUrl: https://login.salesforce.com/services/oauth2/token
> 2019-11-21 13:11:52.328 ERROR 1 --- [SalesforceHttpClient@3991fe6d-14724] o.a.c.c.s.i.s.SubscriptionHelper : Error restarting: \{errors:[{"errorCode":"unknown_error","message":"Login error code:[unknown_error] description:[retry your request]","fields":null}],statusCode:400}
> org.apache.camel.component.salesforce.api.SalesforceException: \{errors:[{"errorCode":"unknown_error","message":"Login error code:[unknown_error] description:[retry your request]","fields":null}],statusCode:400}
>  at org.apache.camel.component.salesforce.internal.SalesforceSession.parseLoginResponse(SalesforceSession.java:279) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.apache.camel.component.salesforce.internal.SalesforceSession.login(SalesforceSession.java:130) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.createClient(SubscriptionHelper.java:353) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.doStart(SubscriptionHelper.java:112) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$4.run(SubscriptionHelper.java:277) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) ~[jetty-util-9.4.22.v20191022.jar:9.4.22.v20191022]
>  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) ~[jetty-util-9.4.22.v20191022.jar:9.4.22.v20191022]
>  at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
> 2019-11-21 13:11:52.331 WARN 1 --- [SalesforceHttpClient@3991fe6d-14724] o.e.jetty.util.thread.QueuedThreadPool :
> java.lang.NullPointerException: null
>  at org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$4.run(SubscriptionHelper.java:284) ~[camel-salesforce-3.0.0-RC3.jar:3.0.0-RC3]
>  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) ~[jetty-util-9.4.22.v20191022.jar:9.4.22.v20191022]
>  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) ~[jetty-util-9.4.22.v20191022.jar:9.4.22.v20191022]
>  at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]
>  
> When restart in restartClient the client instance is null and (line 284)
> if (client.isHandshook()) {
>     LOG.info("Successfully restarted!");
> raise NPE.
> probably the patch:
> if (client != null && client.isHandshook()) { ....
> fix this.
>  
> When error occur Salesforce subscription never restart. We must restart services.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)