Error connecting ElasticSearch 5.4.3 or 5.4.1 maven project java


(Khalil Diouri) #1

I'm working on an app maven java using websphere server 8.5 and elasticsearch 5.4

this is all my dependencies for ES 5

[
org.elasticsearch.client
transport
5.4.1


org.apache.logging.log4j
log4j-api
2.7


org.apache.logging.log4j
log4j-core
2.7
]
I when I start my server (of course es 5 is already started on 9200 localhost) I got this error

[[05/01/18 19:54:31:660 WET] 00000054 SystemErr R ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R Exception in thread "elasticsearch[client][management][T#1]" java.lang.AbstractMethodError: org/elasticsearch/transport/TcpTransport.connectToChannels(Lorg/elasticsearch/cluster/node/DiscoveryNode;Lorg/elasticsearch/transport/ConnectionProfile;)Lorg/elasticsearch/transport/TcpTransport$NodeChannels;
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:534)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:116)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.transport.TransportService.openConnection(TransportService.java:334)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.client.transport.TransportClientNodesService$SniffNodesSampler$1.doRun(TransportClientNodesService.java:507)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[05/01/18 19:54:33:373 WET] 000000b9 SystemErr R at java.lang.Thread.run(Thread.java:785)
]

(David Pilato) #2

Please format your code using </> icon as explained in this guide. It will make your post more readable.

Or use markdown style like:

```
CODE
```

1st of all I'd use the Rest client instead of the Transport client.
Then, could you try you sample code outside the context of websphere?

May be share also your sample code?


(Khalil Diouri) #3

when I tried my code in a separate project (main class) it work fine


(David Pilato) #4

May be a jar conflict with existing libs in websphere?
Log4j?


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.