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

Zili Chen reassigned ZOOKEEPER-3579:
------------------------------------

    Assignee: Zili Chen

> 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
>
> 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)

Reply via email to