We have fixed all the compilation issues. We are using Gradle to build our application. In grade we have this repo entry as well:
maven { url "https://artifacts.elastic.co/maven" }
However, I am trying to start the application it fails with the below exception:
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.xpack.XPackPlugin
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_66]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_66]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[?:1.8.0_66]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_66]
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:55) ~[x-pack-transport-5.3.2.jar:5.3.2]
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:50) ~[x-pack-transport-5.3.2.jar:5.3.2]
at org.elasticsearch.xpack.client.PreBuiltXPackTransportClient.(PreBuiltXPackTransportClient.java:46) ~[x-pack-transport-5.3.2.jar:5.3.2]
I have read few posts and it seems there is some issue while downloading the transitive dependencies for x-pack.
Please let me know how to go about this now and I am not even able to find the XPackPlugin jar anywhere so that I can manually upload to our local nexus repo and make it work.
When you say you use gradle, do you mean Elasticsearch's build-tools gradle plugin, or just gradle in general? If using build-tools, transitive dependencies are disabled (this is how we prefer to handle all dependencies so that we know exactly which jars we are pulling in). The jar file containing XPackPlugin is org.elasticsearch.plugin:x-pack-api, which is a dependency of x-pack-transport.
Thanks for your reply. I intended to mean Gradle in general. When we clean build our project using Gradle (./gradlew clean build), it downloads all the transient dependencies of x-pack-transport (5.3.2). However, it does not pull the x-pack-api. I am not sure if I'm missing something here or there is a problem somewhere else.
I am not sure about the pom.xml of nexus but I tried adding the above repo directly from Nexus UI. Even though it says in service but it is not able to pull any data from the https:// url.
Unfortunately, something is messed up at my end. I have tried everything possible now So I manually downloaded all the jars somehow and uploaded them to my local nexus. We are good for now !
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.