I added it to the pom file but I cannot find it on the maven repositories when I try to add it to the Project through the Project Settings > Libraries > +
Is there any way to update the Maven repositories and find the new API? I'm able to find other libraries like the ones about elasticsearch-twitter or elasticsearch-wikipedia
None, I know it is on the maven repositories but I cannot find it in IntelliJ IDEA. I write org.elasticsearch on the dependency finder and I get no results at all. Neither about the rest of versions.
You mean? When you try to autocomplete when editing the pom.xml file?
May be you have to update the repositories indices? But I think it's not a question specifically related to elasticsearch but to IntelliJ, right?
May be you have to update the repositories indices?
I did.
I mean when I go to Project Structure > Libraries and then try to add the dependency by clicking on the + icon and looking for it in the finder.
But I think it's not a question specifically related to elasticsearch but to IntelliJ, right?
Nope, is not, but I thought that maybe more people had the same problem because is a problem with the elasticsearch dependencies. There is no problem with other libraries.
I can't find it when I look on the Maven dependency finder. And I get this execution error when I add the JAR manually:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 5 more
Everything looks fine for me but I don't know why I keep getting this error:
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
at org.elasticsearch.common.Strings.(Strings.java:459)
at org.elasticsearch.common.settings.Settings.(Settings.java:88)
at org.elasticsearch.common.settings.Settings$Builder.build(Settings.java:1211)
at ElasticSender.getClient(ElasticSender.java:75)
I solved the issue by creating a new idea project and adding my sources and the maven dependencies manually to the pom. Everything fine now, something must be corrupted in the idea files.
Usually when I have an issue like that (nothing changes no matter how many repos I added and several versions. Reimporting , Downloading sources to maven projects) there is something wrong with the pom structure.
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.