You are right. I ran stop-all.sh and start-all.sh, now it works fine. Thanks!

On 2010-9-24 15:30, Harsh J wrote:
My guess: Either you haven't put the JAR in all the tasktracker
machines, or you have not restarted your tasktrackers and jobtracker
after doing so.

On Sat, Sep 25, 2010 at 1:47 AM, Shi Yu<[email protected]>  wrote:
Hi,

I tried to combine in memory mysql database with Mapreduce to do some value
exchanges. In the Mapper, I declare the mysql driver like this
            import com.mysql.jdbc.*;
            import java.sql.DriverManager;
            import java.sql.SQLException;

              String driver = "com.mysql.jdbc.Driver";
                try{
                    Class.forName(driver);
                }...

but it returns an error: java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver
It looks like the class file cannot be found. I put the mysql jdbc jar file
under hadoop\lib\ folder.  This error only occurs when the jdbc connection
is declared in the Mapper, all the other functions outside of the mapper
work fine. I also tried to ant the jdbc jar file together with my class in a
same jar file, but still get the error. Is there any special configuration
required for jdbc connections in Mapper class?

Thanks.

BR,

Shi

--
Postdoctoral Scholar
Institute for Genomics and Systems Biology
Department of Medicine, the University of Chicago
Knapp Center for Biomedical Discovery
900 E. 57th St. Room 10148
Chicago, IL 60637, US
Tel: 773-702-6799






--
Postdoctoral Scholar
Institute for Genomics and Systems Biology
Department of Medicine, the University of Chicago
Knapp Center for Biomedical Discovery
900 E. 57th St. Room 10148
Chicago, IL 60637, US
Tel: 773-702-6799

Reply via email to