当前位置: 首页 > 工具软件 > :path > 使用案例 >

java.lang.IllegalArgumentException: Path must start with / character

袁泰
2023-12-01

java.lang.IllegalArgumentException: Path must start with / character

在调取ZooKeeper创建节点的时候报:

java.lang.IllegalArgumentException: Path must start with / character
    at org.apache.zookeeper.common.PathUtils.validatePath(PathUtils.java:51)
    at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:851)
    at com.egeo.utils.zk.ZooKeeperUserImportSession.releaseDistributedLock(ZooKeeperUserImportSession.java:135)
    at com.egeo.utils.zk.ZooKeeperUserImportSession.main(ZooKeeperUserImportSession.java:160)

解决方法:

ZooKeeper 节点名称以“/”打头

 类似资料: