Caused by: java.lang.ClassNotFoundException: org.elasticsearch.action.Action
at java.net.URLClassLoader.findClass (URLClassLoader.java:436)
at java.lang.ClassLoader.loadClass (ClassLoader.java:588)
at java.lang.ClassLoader.loadClass (ClassLoader.java:521)
at com.data.ElasticSearch.ElasticSearchConfiguration.elasticsearchTemplate (ElasticSearchConfiguration.java:74)
This is my code:
Settings settings = Settings.builder()
.put("cluster.name", clusterName).build();
TransportClient client = new PreBuiltTransportClient(settings)
.addTransportAddress(
new TransportAddress(InetAddress.getByName(host), port)
);
ElasticsearchTemplate elasticsearchTemplate = new ElasticsearchTemplate(client);
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.