所以我已经用sqoop从oracle数据库导入hadoop集群好几天了。
今天,当我尝试执行sqoop导入时,出现以下错误:
ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver
java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:727)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:615)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:638)
at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:237)
at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:221)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:283)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1268)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1080)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:390)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
No encryption was performed by peer.
由于某种原因,司机没有工作。
我试着告诉sqoop驱动程序在哪里使用import命令中的-libjars选项。这不管用。
也许我的驱动程序文件损坏了?
你好,p。
3条答案
按热度按时间ddhy6vgd1#
尝试以下参数
cld4siwp2#
您使用了错误的oracle驱动程序类。使用oracle驱动程序类“oracle.jdbc.driver.oracledriver”。或者,您也可以在sqoop\u home/lib中复制oraclejdbc驱动程序。
xa9qqrwz3#
这是一个软件更新的问题。司机的位置被移动了。现在工作正常了。