I am trying to follow the official Elasticsearch documentation for setting up a transport client,The code is simple as below:
TransportClient client = new PreBuiltTransportClient(Settings.EMPTY);
And the maven dependencies:
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.4.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.2</version>
</dependency>
The error :
Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/netty/logging/InternalLoggerFactory
at org.elasticsearch.transport.Netty3Plugin.<clinit>(Netty3Plugin.java:46)
Hi, I'm facing exactly the same issue.
How did you fix it?
Best regards,
Pietro
Most helpful comment
Hi, I'm facing exactly the same issue.
How did you fix it?
Best regards,
Pietro