Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [geomesa-users] Using the Java API - NoClassDefFoundError

Hi Connor,

The short answer is yes, you need to add the hadoop client not to the accumulo iterators lib/ext but as a compiled dependency in your project itself.
GeoMesa depends on the hadoop-client but does not include it in the jar.
If you add the following to the pom of your project, that should resolve the issue:



On 05/17/2014 05:21 PM, Connor Manning wrote:
Hello, I am trying to get some basic functionality for writing and reading with GeoMesa from Java.  I'm working from documentation.pdf in the geomesa-dist/target area.

I've extracted geomesa/geomesa-dist/target/geomesa-dist-1.0.0-SNAPSHOT-distribution.tar.gz after doing a Maven install, and then I have placed all of the subdirectories from there in my Java classpath (according to Section 2.3 in the documentation).

Then I wrote a small Java program that just creates a DataStore like in Section 3, which builds with no errors - however when running it there are many errors.  I am just trying a mock Accumulo instance for now, but I do have Accumulo, Hadoop, and Zookeeper installed.

It looks like the root cause of the failure is "java.lang.ClassNotFoundException:".  Do I need to add libraries from my Hadoop installation in addition to the HDFS jar in geomesa-dist?

Attached are my simple Java file I'm trying to run, the terminal output, and brief build/run scripts to demonstrate what my classpath looks like.

Thanks for any pointers in the right direction,

geomesa-users mailing list

Back to the top