Hello I am also having the same issue almost, Some time i get java.lang.NoClassDefFoundError (With different class name) and some time java.lang.NoSuchFieldError: LUCENE_6_0_0
My code is below, It breaks on time of build new transport client.
TransportClient client = null;
final Settings settings = Settings.builder().put("cluster.name", CLUSTER_NAME).build();
if (client == null) {
client = new PreBuiltTransportClient(settings)
.addTransportAddress(new TransportAddress(InetAddress.getByName(host), port));
}
I am using maven as build tool and my POM entry for elasticsearch is
UT005023: Exception handling request to /api/inbox/index/vorgang: org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchFieldError: LUCENE_6_0_0
at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:168)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:411)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
at de.init.commons.webapp.system.ssl.MarkSecureHandler.handleRequest(MarkSecureHandler.java:164)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchFieldError: LUCENE_6_0_0
at org.elasticsearch.Version.(Version.java:44)
at org.elasticsearch.common.io.stream.StreamOutput.(StreamOutput.java:76)
at org.elasticsearch.common.io.stream.BytesStream.(BytesStream.java:24)
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:59)
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:56)
at org.elasticsearch.common.io.stream.BytesStreamOutput.(BytesStreamOutput.java:46)
at org.elasticsearch.common.xcontent.XContentBuilder.builder(XContentBuilder.java:69)
at org.elasticsearch.common.settings.Setting.arrayToParsableString(Setting.java:1130)
at org.elasticsearch.common.settings.Setting.access$600(Setting.java:84)
at org.elasticsearch.common.settings.Setting$ListSetting.lambda$new$0(Setting.java:835)
at org.elasticsearch.common.settings.Setting$ListSetting.getRaw(Setting.java:843)
at org.elasticsearch.common.settings.Setting.lambda$listSetting$29(Setting.java:1094)
at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:1099)
at org.elasticsearch.common.settings.Setting.listSetting(Setting.java:1094)
at org.elasticsearch.transport.TcpTransport.(TcpTransport.java:130)
at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:98)
at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:128)
at org.elasticsearch.client.transport.TransportClient.(TransportClient.java:262)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:128)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:114)
at org.elasticsearch.transport.client.PreBuiltTransportClient.(PreBuiltTransportClient.java:104)
at de.init.commons.webapp.features.app_inbox.InboxAPI.createIndex(InboxAPI.java:490)
at de.init.commons.webapp.features.app_inbox.InboxAPI.indexVorgang(InboxAPI.java:449)
at
@dearnomi Does your application also depend on Lucene directly? This could happen if you have jarhell, and an older version of Lucene is "winning" in the race to be loaded.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.