java.lang.NullPointerException

Apache's JIRA Issue Tracker | Rakesh Kumar Singh | 4 months ago
  1. 0

    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)

    Apache's JIRA Issue Tracker | 4 months ago | Rakesh Kumar Singh
    java.lang.NullPointerException
  2. 0

    Throwing nullpointerException when run the command "config -c" when client port is mentioned as separate and not like new style 1. Configure the zookeeper to start in cluster mode like below- clientPort=2181 server.1=10.18.101.80:2888:3888 server.2=10.18.219.50:2888:3888 server.3=10.18.221.194:2888:3888 and not like below:- server.1=10.18.101.80:2888:3888:participant;2181 server.2=10.18.219.50:2888:3888:participant;2181 server.3=10.18.221.194:2888:3888:participant;2181 2. Start the cluster and one client using >zkCli.sh 3. execute command "config -c" It is throwing nullpointerException:- root@BLR1000010865:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin# ./zkCli.sh Connecting to localhost:2181 2016-08-29 21:45:19,558 [myid:] - INFO [main:Environment@109] - Client environment:zookeeper.version=3.5.1-alpha--1, built on 08/18/2016 08:20 GMT 2016-08-29 21:45:19,561 [myid:] - INFO [main:Environment@109] - Client environment:host.name=BLR1000010865 2016-08-29 21:45:19,562 [myid:] - INFO [main:Environment@109] - Client environment:java.version=1.7.0_17 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.vendor=Oracle Corporation 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.home=/usr/lib/jvm/oracle_jdk7/jre 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.class.path=/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../build/classes:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../build/lib/*.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/slf4j-log4j12-1.7.5.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/slf4j-api-1.7.5.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/servlet-api-2.5-20081211.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/netty-3.7.0.Final.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/log4j-1.2.16.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/jline-2.11.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/jetty-util-6.1.26.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/jetty-6.1.26.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/javacc.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/jackson-mapper-asl-1.9.11.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/jackson-core-asl-1.9.11.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/commons-cli-1.2.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../lib/ant-eclipse-1.0-jvm1.2.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../zookeeper-3.5.1-alpha.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../src/java/lib/ant-eclipse-1.0-jvm1.2.jar:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin/../conf: 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.io.tmpdir=/tmp 2016-08-29 21:45:19,564 [myid:] - INFO [main:Environment@109] - Client environment:java.compiler=<NA> 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:os.name=Linux 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:os.arch=amd64 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:os.version=4.4.0-31-generic 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:user.name=root 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:user.home=/root 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:user.dir=/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin 2016-08-29 21:45:19,565 [myid:] - INFO [main:Environment@109] - Client environment:os.memory.free=114MB 2016-08-29 21:45:19,567 [myid:] - INFO [main:Environment@109] - Client environment:os.memory.max=227MB 2016-08-29 21:45:19,568 [myid:] - INFO [main:Environment@109] - Client environment:os.memory.total=119MB 2016-08-29 21:45:19,570 [myid:] - INFO [main:ZooKeeper@716] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@149ee0f1 Welcome to ZooKeeper! 2016-08-29 21:45:19,596 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1138] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2016-08-29 21:45:19,603 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@980] - Socket connection established, initiating session, client: /127.0.0.1:43574, server: localhost/127.0.0.1:2181 JLine support is enabled 2016-08-29 21:45:19,630 [myid:] - INFO [main-SendThread(localhost:2181):ClientCnxn$SendThread@1400] - Session establishment complete on server localhost/127.0.0.1:2181, sessionid = 0x20044a0c51d0000, negotiated timeout = 30000 WATCHER:: WatchedEvent state:SyncConnected type:None path:null [zk: localhost:2181(CONNECTED) 0] [zk: localhost:2181(CONNECTED) 0] config -c Exception in thread "main" java.lang.NullPointerException at org.apache.zookeeper.server.util.ConfigUtils.getClientConfigStr(ConfigUtils.java:56) at org.apache.zookeeper.cli.GetConfigCommand.exec(GetConfigCommand.java:64) at org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:674) 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) root@BLR1000010865:/home/Rakesh/Zookeeper/18_Aug/cluster/zookeeper-3.5.1-alpha/bin#

    Apache's JIRA Issue Tracker | 3 months ago | Rakesh Kumar Singh
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray()
    2. Zookeeper
      ZooKeeperMain.main
      1. org.apache.zookeeper.ZooKeeperMain$MyCommandOptions.getArgArray(ZooKeeperMain.java:171)
      2. org.apache.zookeeper.ZooKeeperMain.processZKCmd(ZooKeeperMain.java:613)
      3. org.apache.zookeeper.ZooKeeperMain.processCmd(ZooKeeperMain.java:577)
      4. org.apache.zookeeper.ZooKeeperMain.executeLine(ZooKeeperMain.java:360)
      5. org.apache.zookeeper.ZooKeeperMain.run(ZooKeeperMain.java:320)
      6. org.apache.zookeeper.ZooKeeperMain.main(ZooKeeperMain.java:280)
      6 frames