[ https://issues.apache.org/jira/browse/ZOOKEEPER-2532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enrico Olivelli updated ZOOKEEPER-2532: --------------------------------------- Fix Version/s: 3.5.7 > zkCli throwing nullpointerException instead it should provide help when > invalid input is entered > ------------------------------------------------------------------------------------------------ > > Key: ZOOKEEPER-2532 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2532 > Project: ZooKeeper > Issue Type: Bug > Components: java client > Affects Versions: 3.5.1, 3.5.2 > Reporter: Rakesh Kumar Singh > Assignee: Rakesh Kumar Singh > Priority: Minor > Labels: patch > Fix For: 3.6.0, 3.5.6, 3.5.7 > > Attachments: ZOOKEEPER-2532.patch, ZOOKEEPER-2532.patch > > > 1. a) Connect to zookeeper using zkCli > b) just input space and then hit enter > 2. a) Connect to zookeeper using zkCli and hit enter it will come as > connected > b) just input space and then hit enter > Console log is as below:- > [zk: localhost:2181(CONNECTING) 0] 2016-08-25 16:54:48,143 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxnSocketNetty$ZKClientPipelineFactory@363] > - SSL handler added for channel: null > 2016-08-25 16:54:48,175 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxn$SendThread@980] - Socket > connection established, initiating session, client: /0:0:0:0:0:0:0:1:44592, > server: localhost/0:0:0:0:0:0:0:1:2181 > 2016-08-25 16:54:48,178 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxnSocketNetty$1@146] - channel is > connected: [id: 0xd03f4226, /0:0:0:0:0:0:0:1:44592 => > localhost/0:0:0:0:0:0:0:1:2181] > 2016-08-25 16:54:48,288 [myid:] - INFO [New I/O worker > #1:ClientCnxn$SendThread@1400] - Session establishment complete on server > localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x101a00305cc0005, negotiated > timeout = 30000 > WATCHER:: > WatchedEvent state:SyncConnected type:None path:null > > Exception in thread "main" java.lang.NullPointerException > at > org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray(ZooKeeperMain.java:171) > at > org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:613) > at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577) > at > org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360) > at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320) > at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280) > ---------------------------------------- > After connection is established, input space and hit enter > [zk: localhost:2181(CONNECTING) 0] 2016-08-25 16:56:22,445 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxnSocketNetty$ZKClientPipelineFactory@363] > - SSL handler added for channel: null > 2016-08-25 16:56:22,481 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxn$SendThread@980] - Socket > connection established, initiating session, client: /0:0:0:0:0:0:0:1:44594, > server: localhost/0:0:0:0:0:0:0:1:2181 > 2016-08-25 16:56:22,484 [myid:] - INFO > [main-SendThread(localhost:2181):ClientCnxnSocketNetty$1@146] - channel is > connected: [id: 0xe6d3a461, /0:0:0:0:0:0:0:1:44594 => > localhost/0:0:0:0:0:0:0:1:2181] > 2016-08-25 16:56:22,597 [myid:] - INFO [New I/O worker > #1:ClientCnxn$SendThread@1400] - Session establishment complete on server > localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x101a00305cc0007, negotiated > timeout = 30000 > WATCHER:: > WatchedEvent state:SyncConnected type:None path:null > [zk: localhost:2181(CONNECTED) 0] > Exception in thread "main" java.lang.NullPointerException > at > org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray(ZooKeeperMain.java:171) > at > org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:613) > at org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577) > at > org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360) > at org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320) > at org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280) -- This message was sent by Atlassian Jira (v8.3.2#803003)