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

mac2025-07-18  4

Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.elasticsearch.transport.netty4.Netty4InternalESLogger.<init>(Netty4InternalESLogger.java:34) The following method did not exist: org.elasticsearch.common.logging.Loggers.getLogger(Ljava/lang/String;)Lorg/apache/logging/log4j/Logger; The method's class, org.elasticsearch.common.logging.Loggers, is available from the following locations: jar:file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar!/org/elasticsearch/common/logging/Loggers.class It was loaded from the following location: file:/Users/admin/.m2/repository/org/elasticsearch/elasticsearch/6.8.4/elasticsearch-6.8.4.jar

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

<dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>6.8.4</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.8.4</version> <exclusions> <exclusion> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.elasticsearch.plugin</groupId> <artifactId>transport-netty4-client</artifactId> <version>6.8.4</version> </dependency>
最新回复(0)