问题 I am facing a strange NPE when starting Apache Curator's ServiceProvider . This happens intermittently on the servers, but I was not able to reproduce the error locally, that's why it's so difficult to know what's the problem. Here's the code: CuratorFramework curatorFramework = CuratorFrameworkFactory.newClient(zookeeperConnectString, new RetryNTimes(5, 1000)); curatorFramework.start(); ServiceDiscovery<Void> serviceDiscovery = ServiceDiscoveryBuilder.builder(Void.class).basePath(ZK_BASE