I'm trying to get the Elasticsearch Java SDK TransportClient Initialized, and I'm getting the following exception:
rg.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.common.settings.IndexScopedSettings
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982)
Maybe, however I'm not sure why that would be the case. I'm not using spring-data-elasticsearch. Generally I'd say that unless I'm integrating with spring somehow, I haven't had any issues importing any other maven libraries.
Never tried it unfortunately, had to move on. I'm hard pressed to imagine how spring could cause the inability to find a class from a completely different maven library. If the issue does have something to do with spring, personally I'd call it a defect with the ES maven library, as an external dependency shouldn't cause class resolution problems.
Personally my opinion is that we should just let the TransportClient get deprecated, ignore this issue as a very uncommon situation, and for anyone reading this post, they should move on to using the RestClient or RestHighLevelClient.
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.