I am repeatedly seeing NPEs for calls made to ZkClient. I am using zkClient-0.5 
 + zookeeper 3.4.5 + kafka 0.8.2.0

There is a related jira for similar NPE issue, and looks like zkClient-0.5 must 
have solved the issue.
https://issues.apache.org/jira/browse/KAFKA-2169
https://issues.apache.org/jira/browse/KAFKA-824

Some of the stack traces of calls I made :

java.lang.NullPointerException: null

                at 
org.I0Itec.zkclient.ZkConnection.exists(ZkConnection.java:107) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient$3.call(ZkClient.java:631) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient$3.call(ZkClient.java:628) 
~[zkclient-0.5.jar:0.5]

                at 
org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:883) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient.exists(ZkClient.java:628) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient.exists(ZkClient.java:637) 
~[zkclient-0.5.jar:0.5]

                at kafka.admin.AdminUtils$.topicExists(AdminUtils.scala:163) 
~[kafka_2.10-0.8.2.0.jar:na]

                at kafka.admin.AdminUtils.topicExists(AdminUtils.scala) 
~[kafka_2.10-0.8.2.0.jar:na]


java.lang.NullPointerException: null

                at 
org.I0Itec.zkclient.ZkConnection.getChildren(ZkConnection.java:112) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:608) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient$2.call(ZkClient.java:605) 
~[zkclient-0.5.jar:0.5]

                at 
org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:883) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:605) 
~[zkclient-0.5.jar:0.5]

                at org.I0Itec.zkclient.ZkClient.getChildren(ZkClient.java:601) 
~[zkclient-0.5.jar:0.5]

                at 
kafka.utils.ZkUtils$.getChildrenParentMayNotExist(ZkUtils.scala:475) 
~[kafka_2.10-0.8.2.0.jar:na]

                at kafka.utils.ZkUtils$.getAllTopics(ZkUtils.scala:700) 
~[kafka_2.10-0.8.2.0.jar:na]

                at kafka.utils.ZkUtils.getAllTopics(ZkUtils.scala) 
~[kafka_2.10-0.8.2.0.jar:na]



Is there a solution for this?


Thanks,
Hema
"This message is intended only for the use of the addressee(s) and may contain 
information that is PRIVILEGED and CONFIDENTIAL. If you are not the intended 
recipient(s), you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please erase all copies of the message and its attachments and notify 
the sender immediately."

Reply via email to