ElasticSearch5.0.0 Exception in thread "main" java.lang.AbstractMethodError

近日将ElasiticSearch升级至5.0.0后,一直出现异常:

Exception in thread "main" java.lang.AbstractMethodError: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:84)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:58)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:47)
    at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49)
    at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:61)
    at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:52)
    at org.elasticsearch.transport.netty4.Netty4Transport.createBootstrap(Netty4Transport.java:200)
    at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:171)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
    at org.elasticsearch.transport.TransportService.doStart(TransportService.java:182)
    at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:68)
    at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:169)
    at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:228)
    at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:69)
    at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:65)

原因:jar包冲突。elasticsearch5.0.0还需要io.netty和log4j支持,原项目中有包冲突。
解决方法:在Maven内查找排除jar包,最终找到冲突的jar包,干掉恢复正常。

    
  org.apache.qpid    
  qpid-jms-client    
  0.9.0

你可能感兴趣的:(ElasticSearch5.0.0 Exception in thread "main" java.lang.AbstractMethodError)