问题描述
Exceptioninthread"main"java.lang.RuntimeException:Errorinconfiguringobjectatorg.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:93)atorg.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:64)atorg.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:117)atorg.apache.hadoop.mapred.JobConf.getInputFormat(JobConf.java:596)atorg.apache.hadoop.mapred.JobClient.writeOldSplits(JobClient.java:1081)atorg.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:1073)atorg.apache.hadoop.mapred.JobClient.access$700(JobClient.java:179)atorg.apache.hadoop.mapred.JobClient$2.run(JobClient.java:983)atorg.apache.hadoop.mapred.JobClient$2.run(JobClient.java:936)atjava.security.AccessController.doPrivileged(NativeMethod)atjavax.security.auth.Subject.doAs(Subject.java:415)atorg.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)atorg.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:936)atorg.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:910)atorg.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1353)atcom.hebut.mr.ReadDB.main(ReadDB.java:119)Causedby:java.lang.reflect.InvocationTargetExceptionatsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:601)atorg.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:88)...15moreCausedby:java.lang.RuntimeException:java.lang.ClassNotFoundException:com.mysql.jdbc.Driveratorg.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:271)...20moreCausedby:java.lang.ClassNotFoundException:com.mysql.jdbc.Driveratjava.net.URLClassLoader$1.run(URLClassLoader.java:366)atjava.net.URLClassLoader$1.run(URLClassLoader.java:355)atjava.security.AccessController.doPrivileged(NativeMethod)atjava.net.URLClassLoader.findClass(URLClassLoader.java:354)atjava.lang.ClassLoader.loadClass(ClassLoader.java:423)atsun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)atjava.lang.ClassLoader.loadClass(ClassLoader.java:356)atjava.lang.Class.forName0(NativeMethod)atjava.lang.Class.forName(Class.java:188)atorg.apache.hadoop.mapred.lib.db.DBConfiguration.getConnection(DBConfiguration.java:123)atorg.apache.hadoop.mapred.lib.db.DBInputFormat.configure(DBInputFormat.java:266)...20more
解决方案
解决方案二:
1MySQLJDBC的驱动.jar包导入到工程的classpath中了没有?2在情况1下没有错误,将MySQLJDBC的驱动.jar包拷贝到另外的节点上的hdfs/lib目录下?3在上述两种情况下,bin/hadoopjaryourapp.jarMainClass-libjarsmysql-jdbc.jar希望能帮助你。
解决方案三:
首先先表示感谢,这个问题还是没解决我看教程里弄得还是不行我想知道,是不是MYSQL只在Master机子上安装,还是每台机子都得安装?谢谢
解决方案四:
楼主,这个问题你解决了吗,,同样的问题啊,楼主如果解决了的话,可以告诉我该怎么弄啊,已崩溃了!!!