This code
package threepieces.esonly; import org.elasticsearch.client.Client; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.node.NodeBuilder; public class TrivialNode { public static void main(String[] argsIgnored) { Settings settings = Settings.settingsBuilder() .put("path.home", "/Applications/elasticsearch-2.0.0/") .put("cluster.name", "epsteinj-elasticsearch-local") .put("http.enabled", true) .put("index.number_of_shards", 1) .put("index.number_of_replicas", 1).build(); Client client = NodeBuilder.nodeBuilder().settings(settings).client(true).node().client(); } }
Causes this error
Exception in thread "main" java.lang.IllegalStateException: failed to load bundle [file:/Applications/elasticsearch-2.0.0/plugins/license/license-2.0.0.jar, file:/Applications/elasticsearch-2.0.0/plugins/license/license-core-2.0.0.jar, file:/Applications/elasticsearch-2.0.0/plugins/license/license-plugin-api-2.0.0.jar, file:/Applications/elasticsearch-2.0.0/plugins/marvel-agent/marvel-agent-2.0.0.jar] due to jar hell at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:342) at org.elasticsearch.plugins.PluginsService.(PluginsService.java:113) at org.elasticsearch.node.Node.(Node.java:144) at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145) at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:152) at threepieces.esonly.TrivialNode.main(TrivialNode.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: java.lang.IllegalStateException: jar hell! class: jdk.packager.services.UserJvmOptionsService jar1: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/ant-javafx.jar jar2: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib/packager.jar at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:267) at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:185) at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:340) ... 10 more
Any ideas why?