【报错】ES报错找不到Gson类
报错信息
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.elasticsearch.jest.JestAutoConfiguration] from ClassLoader []
Caused by: java.lang.NoClassDefFoundError: com/google/gson/Gson
Caused by: java.lang.ClassNotFoundException: com.google.gson.Gson
解决
启动dubbo提供者报错:
发现:es找不到gson的类
将jest的gson排除,重新引入低版本的gson
5.x的jest引入的是2.8x版本的gson
排除后,引入2.6版本的gson,即可,项目顺利运行;
具体是什么原因,尚不明确,希望知道的大佬,能指出;
<dependency> <groupId>io.searchbox</groupId> <artifactId>jest</artifactId> <version>5.3.4</version> <exclusions> <exclusion> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.6</version> </dependency>
相关推荐
SXIAOYI 2020-09-16
xiaonuoyal 2020-06-17
SXIAOYI 2020-06-11
yinbaoshiguang 2020-06-09
Chydar 2020-06-02
nalanrumeng 2020-06-01
xiaonuoyal 2020-06-01
nalanrumeng 2020-05-19
xiaonuoyal 2020-04-14
ITprivate 2020-03-26
ITprivate 2020-02-12
nalanrumeng 2020-01-13
xiaonuoyal 2019-12-07
xiaonuoyal 2019-11-18
TOmyhonour 2019-11-16
csdnxpw 2019-11-12