I've just asked another question since I was facing some ClassNotFoundException.
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.plugins.NetworkPlugin
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_131]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_131]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_131]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_131]
... 56 common frames omitted
It's been pointed out to me that this exception means that the mentioned class is not found in the classpath at runtime. This is in the case that I have the container package in the pom.xml file.
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>5.5.0</version>
</dependency>
So now my question is, how can a package be named as a dependency but some class in it be missing at runtime? And also, mvn dependency:tree -Dverbose -Dincludes=commons-collections
returns no conflict.
This is a Spring Boot project that I'm running using IntelliJ Idea in debug mode. I'm also using a dozen other packages in my code in the exact same way and they all work smoothly. But as soon as I add Elasticsearch, I face the mentioned exception.