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

[jira] [Updated] (ZOOKEEPER-3579) handle NPE gracefully when the watch parameter of zookeeper java client is null

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-3579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ZOOKEEPER-3579:
--------------------------------------
    Labels: pull-request-available  (was: )

> handle NPE gracefully when the watch parameter of zookeeper java client is null
> -------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3579
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3579
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: java client
>            Reporter: maoling
>            Assignee: Zili Chen
>            Priority: Minor
>              Labels: pull-request-available
>
> When we use the native java client
> {code:java}
> try {
>   zk = new ZooKeeper(connectString, (int) sessionTimeout, null);
> } catch (IOException e) {
>   throw new DBException("Creating connection failed.");
> }
> {code}
> We will get the following, this issue had existed in all the zookeeper releases for a long time
> {code:java}
> 2019-10-14 18:41:49 ERROR ClientCnxn:537 - Error while calling watcher2019-10-14 18:41:49 ERROR ClientCnxn:537 - Error while calling watcherjava.lang.NullPointerException at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:535) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510)2019-10-14 18:41:50 ERROR ClientCnxn:537 - Error while calling watcherjava.lang.NullPointerException at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:535) at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510)
> {code}



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