Re: Hadoop0.20 - Class Not Found exception

2009-06-29 Thread Steve Loughran

Amandeep Khurana wrote:

I'm getting the following error while starting a MR job:

Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at
org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:297)
... 21 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.hadoop.mapred.lib.db.DBConfiguration.getConnection(DBConfiguration.java:123)
at
org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:292)
... 21 more

Interestingly, the relevant jar is bundled into the MR job jar and its also
there in the $HADOOP_HOME/lib directory.

Exactly same thing worked with 0.19.. Not sure what could have changed or I
broke to cause this error...


could be classloader hierarchy; the JDBC driver needs to be at the right 
level. Try preheating the driver by loading it in your own code, then 
jdbc:URLs might work, and take it out of the MR Job JAR


Re: Hadoop0.20 - Class Not Found exception

2009-06-26 Thread imcaptor
I meet the question also, resolved by transfer a class name to JobConf
constructor.

If you new the

*JobConf,you must transfer a class name to it.*


2009/6/27 Amandeep Khurana 

> I'm getting the following error while starting a MR job:
>
> Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
> oracle.jdbc.driver.OracleDriver
>at
>
> org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:297)
>... 21 more
> Caused by: java.lang.ClassNotFoundException:
> oracle.jdbc.driver.OracleDriver
>at java.net.URLClassLoader$1.run(Unknown Source)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(Unknown Source)
>at java.lang.ClassLoader.loadClass(Unknown Source)
>at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>at java.lang.ClassLoader.loadClass(Unknown Source)
>at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>at java.lang.Class.forName0(Native Method)
>at java.lang.Class.forName(Unknown Source)
>at
>
> org.apache.hadoop.mapred.lib.db.DBConfiguration.getConnection(DBConfiguration.java:123)
>at
>
> org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:292)
>... 21 more
>
> Interestingly, the relevant jar is bundled into the MR job jar and its also
> there in the $HADOOP_HOME/lib directory.
>
> Exactly same thing worked with 0.19.. Not sure what could have changed or I
> broke to cause this error...
>
> Amandeep
>
>
> Amandeep Khurana
> Computer Science Graduate Student
> University of California, Santa Cruz
>


Hadoop0.20 - Class Not Found exception

2009-06-26 Thread Amandeep Khurana
I'm getting the following error while starting a MR job:

Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException:
oracle.jdbc.driver.OracleDriver
at
org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:297)
... 21 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.hadoop.mapred.lib.db.DBConfiguration.getConnection(DBConfiguration.java:123)
at
org.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:292)
... 21 more

Interestingly, the relevant jar is bundled into the MR job jar and its also
there in the $HADOOP_HOME/lib directory.

Exactly same thing worked with 0.19.. Not sure what could have changed or I
broke to cause this error...

Amandeep


Amandeep Khurana
Computer Science Graduate Student
University of California, Santa Cruz