java.lang.NoClassDefFoundError: Could not initialize class > org.apache.hadoop.conf.Configuration > HadoopWriterLib.HadoopWriter.OpenFileSystem(HadoopWriter.java:22) > HadoopWriterLib.HadoopWriter.<init>(HadoopWriter.java:16) > HadoopServletTest.doGet(HadoopServletTest.java:35) > javax.servlet.http.HttpServlet.service(HttpServlet.java:621) > javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > > *note* *The full stack trace of the root cause is available in the Apache > Tomcat/7.0.6 logs.* > > The error can be a problem on my ubuntu server ? > > thanks > > On Mon, Jan 24, 2011 at 1:01 PM, Alessandro Binhara <binhara@gmail.com > >wrote: > > > ..i try > > java -classpath hadoop-core-0.20.1.jar -jar HahoopHdfsHello.jar > > > > i got a same error.. > > i will try build a servlet and run on tomcat... > > i try many issues to config a classpath... all fail.. > > > > thanks > > > > > > On Mon, Jan 24, 2011 at 12:54 PM, Harsh J <qwertymaniac@gmail.com> > wrote: > > > >> The issue would definitely lie with your CLASSPATH. > >> > >> Ideally, while beginning development using Hadoop 0.20, it is better > >> to use the `hadoop jar` command to launch jars of any kind that > >> require Hadoop libraries; be it MapReduce or not. The command will > >> ensure that all the classpath requirements for Hadoop-side libraries > >> are satisfied, so you don't have to worry. > >> > >> Anyhow, try launching it this way: > >> $ java -classpath hadoop-0.20.2-core.jar -jar HadoopHdfsHello.jar; # > >> This should run just fine. > >> > >> On Mon, Jan 24, 2011 at 5:06 PM, Alessandro Binhara <binhara@gmail.com> > >> wrote: Hello .. i solve problem in jar.. i put a hadoop-core-0.20.2.jar in same jar dir. i configure a class path export CLASSPATH=.:$JAVA_HOME i got this erro in shell root:~# java -jar HahoopHdfsHello.jar Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via hadoop-general by Owen O'Malley, 1 year ago
> > > > i got a same error.. > > i will try build a servlet and run on tomcat... > > i try many issues to config a classpath... all fail.. > > > > thanks > > > > > > On Mon, Jan 24, 2011 at 12:54 PM, Harsh J <qwertymaniac@gmail.com> > wrote: > > > >> The
via hadoop-general by Alessandro Binhara, 4 months ago
> org/apache/hadoop/conf/Configuration
via hadoop-general by Alessandro Binhara, 4 months ago
org/apache/hadoop/conf/Configuration
via hadoop-general by Harsh J, 4 months ago
org/apache/hadoop/conf/Configuration
java.lang.NoClassDefFoundError: Could not initialize class > org.apache.hadoop.conf.Configuration > HadoopWriterLib.HadoopWriter.OpenFileSystem(HadoopWriter.java:22) > HadoopWriterLib.HadoopWriter.<init>(HadoopWriter.java:16) > HadoopServletTest.doGet(HadoopServletTest.java:35) > javax.servlet.http.HttpServlet.service(HttpServlet.java:621) > javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > > *note* *The full stack trace of the root cause is available in the Apache > Tomcat/7.0.6 logs.* > > The error can be a problem on my ubuntu server ? > > thanks > > On Mon, Jan 24, 2011 at 1:01 PM, Alessandro Binhara <binhara@gmail.com > >wrote: > > > ..i try > > java -classpath hadoop-core-0.20.1.jar -jar HahoopHdfsHello.jar > > > > i got a same error.. > > i will try build a servlet and run on tomcat... > > i try many issues to config a classpath... all fail.. > > > > thanks > > > > > > On Mon, Jan 24, 2011 at 12:54 PM, Harsh J <qwertymaniac@gmail.com> > wrote: > > > >> The issue would definitely lie with your CLASSPATH. > >> > >> Ideally, while beginning development using Hadoop 0.20, it is better > >> to use the `hadoop jar` command to launch jars of any kind that > >> require Hadoop libraries; be it MapReduce or not. The command will > >> ensure that all the classpath requirements for Hadoop-side libraries > >> are satisfied, so you don't have to worry. > >> > >> Anyhow, try launching it this way: > >> $ java -classpath hadoop-0.20.2-core.jar -jar HadoopHdfsHello.jar; # > >> This should run just fine. > >> > >> On Mon, Jan 24, 2011 at 5:06 PM, Alessandro Binhara <binhara@gmail.com> > >> wrote: Hello .. i solve problem in jar.. i put a hadoop-core-0.20.2.jar in same jar dir. i configure a class path export CLASSPATH=.:$JAVA_HOME i got this erro in shell root:~# java -jar HahoopHdfsHello.jar Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
at undefined.HadooHdfsHello.main(HadooHdfsHello.java:18)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.