5、org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /dubbo/xxx.xxx
dubbo用的2.7.6,zookeeper用的3.4.13,curator-framework用的4.2.0报错,版本不匹配导致,zookeeper换成3.4.10就好了
4、SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
没有logger的实现,缺少依赖包,导入log4j12用log4j的实现,还有一个logback实现:logback-classic,习惯用哪个就导入哪个
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
3、The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
zookeeper的版本和curator版本不匹配,当时我是用的zk3.5+版本,换成3.4.13版本该提示消失
2、java.lang.ClassNotFoundException: com.google.common.base.Function
启动服务找不到这个类,我当时是使用curator-framework的时候排除了guava,添加上依赖:
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>27.0.1-jre</version>
</dependency>
1、springboot Class path contains multiple SLF4J bindings.
springboot日志用的logback,依赖其它包中用了log4j,要排除其中一个,排除logback依赖如下
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
排除log4j一样在含有log4j的依赖下加exclusion,当时在父项目pom里配置的dependencies按说应该能继承,但在子项目中logback-classic依赖还是传递下来了,单独配spring-boot-starter排除的话就提示重复依赖,不得已在父项目依赖删掉,子项目独立配的,奇了怪了。