The function is very simple:
import org.apache.curator.framework.CuratorFramework;
...
private final CuratorFramework curator;
...
void deleteZkState() throws Exception {
try {
curator.delete().deletingChildrenIfNeeded().forPath("/myproject/mystate");
} catch (NoNodeException e) {
logger.info(e.getMessage());
}
}
However when I compile it I got this error at the catch
statement:
error: [strict] Using type org.apache.zookeeper.KeeperException.NoNodeException from an indirect dependency
The zookeeper version is 3.4.14.
What is causing this error and how can I fix it?
java version is openjdk 10.0.2 2018-07-17
This error is actually caused by an error in the build configuration.
In the bazel's BUILD I should add the zookeeper
dependency,.