Note that there are some explanatory texts on larger screens.

plurals
  1. POHadoop Maven Dependency Error
    primarykey
    data
    text
    <p>I am trying to build a Hadoop job using Maven. This job works well when I don't use Maven and directly import the Hadoop Jar dependency into eclipse.</p> <p>I'm also able to build a simple jar (hello world type) using Maven without the Hadoop dependency.</p> <p>But when I add the Hadoop dependency, and run the jar, I get this error:</p> <pre><code>dataException in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration at org.graphhadoop.CreateAdjacency.Adjacency(CreateAdjacency.java:74) at org.graphhadoop.Driver.main(Driver.java:12) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.conf.Configuration at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ... 2 more </code></pre> <p>The pom file changes are these:</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;3.8.1&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.hadoop&lt;/groupId&gt; &lt;artifactId&gt;hadoop-core&lt;/artifactId&gt; &lt;version&gt;0.20.203.0&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifest&gt; &lt;addClasspath&gt;true&lt;/addClasspath&gt; &lt;mainClass&gt;org.graphhadoop.Driver&lt;/mainClass&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;manifestEntries&gt; &lt;Class-Path&gt;../target/classes&lt;/Class-Path&gt; &lt;/manifestEntries&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; </code></pre> <p>Where am I going wrong? </p> <p>Edit:</p> <p>For now, I am running the Jar locally - not on Hadoop, but on local data.</p> <pre><code>java -jar jarname.jar </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload