Sqoop导入驱动程序问题:无法加载驱动程序

问题描述 投票:0回答:3

因此,几天来我一直使用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驱动程序在导入命令中使用-libjars选项的位置。这没有用。

也许我的驱动程序文件已损坏?

关于,P。

jdbc hadoop driver sqoop
3个回答
0
投票

您使用了错误的oracle驱动程序类。使用Oracle驱动程序类“ oracle.jdbc.driver.OracleDriver”。另外,您也可以在sqoop_home / lib中复制oracle jdbc驱动程序。


0
投票

这是软件更新出现的问题。驱动程序的位置已移动。现在工作正常。


0
投票

尝试以下参数

--driver oracle.jdbc.driver.OracleDriver
© www.soinside.com 2019 - 2024. All rights reserved.