Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Expert Contributor

SYMPTOM: While integrating Storm 1.0.1 to Elastic Search 5.0.0, the following error is observed:

Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/common/base/Preconditions 
at org.apache.storm.elasticsearch.common.EsConfig.<init>(EsConfig.java:62) 
at org.apache.storm.elasticsearch.common.EsConfig.<init>(EsConfig.java:49) 
at com.mz.pipeline.StreamToES5_1.main(StreamToES5_1.java:72) 
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:498) 
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) 
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.base.Preconditions
Following were the maven dependencies:
<dependency> 
<groupId>org.apache.storm</groupId> 
<artifactId>storm-core</artifactId> 
<version>1.0.2</version> 
<exclusions> 
<exclusion> 
<groupId>org.slf4j</groupId> 
<artifactId>log4j-over-slf4j</artifactId> 
</exclusion> 
</exclusions> 
</dependency> 

<dependency> 
<groupId>org.elasticsearch</groupId> 
<artifactId>elasticsearch</artifactId> 
<version>5.0.0</version> 
</dependency> 

<dependency> 
<groupId>org.apache.storm</groupId> 
<artifactId>storm-elasticsearch</artifactId> 
<version>1.0.2</version> 
</dependency>
ROOT CAUSE: Apache libraries were used to compile/package the topology instead of using Hortonworks repository RESOLUTION: Please add the Hortonworks repository in the pom.xml:
<repositories> 
<repository> 
<id>hortonworks</id> 
<url>http://repo.hortonworks.com/content/groups/public/</url> 
</repository> 
</repositories>
Then change the storm artifact versions, which should be in this format: <apache_version>.<HDP-version> For example, for 'storm-core' in HDP 2.5.0.0, version would be 1.0.1.2.5.0.0-1245. Similarly, for 'storm-elasticsearch' it would be: 1.0.1.2.5.0.0-1245 (for HDP 2.5.0.0). Please find the version corresponding to your HDP here: http://repo.hortonworks.com/content/groups/public/org/apache/storm/
981 Views
0 Kudos
Version history
Last update:
‎03-26-2017 09:18 PM
Updated by:
Contributors