An attempt was made to call a method that does not exist. The attempt was made from the following lo

淡淡的烟草味﹌ 2023-05-29 02:33 147阅读 0赞
  1. Description:
  2. An attempt was made to call a method that does not exist. The attempt was made from the following location:
  3. org.elasticsearch.transport.netty4.Netty4InternalESLogger.<init>(Netty4InternalESLogger.java:34)
  4. The following method did not exist:
  5. org.elasticsearch.common.logging.Loggers.getLogger(Ljava/lang/String;)Lorg/apache/logging/log4j/Logger;
  6. The method's class, org.elasticsearch.common.logging.Loggers, is available from the following locations:
  7. jar:file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar!/org/elasticsearch/common/logging/Loggers.class
  8. It was loaded from the following location:
  9. file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar

原因是因为版本不对 全部es的版本要对应上 下面是maven依赖就可以了

  1. <dependency>
  2. <groupId>org.elasticsearch</groupId>
  3. <artifactId>elasticsearch</artifactId>
  4. <version>6.8.4</version>
  5. </dependency>
  6. <dependency>
  7. <groupId>org.elasticsearch.client</groupId>
  8. <artifactId>transport</artifactId>
  9. <version>6.8.4</version>
  10. <exclusions>
  11. <exclusion>
  12. <groupId>org.elasticsearch</groupId>
  13. <artifactId>elasticsearch</artifactId>
  14. </exclusion>
  15. </exclusions>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.elasticsearch.plugin</groupId>
  19. <artifactId>transport-netty4-client</artifactId>
  20. <version>6.8.4</version>
  21. </dependency>

发表评论

表情:
评论列表 (有 0 条评论,147人围观)

还没有评论,来说两句吧...

相关阅读