首先,我通过所有的职位与这个问题,但没有解决我的问题,所以这不是一个重复的职位。我在dev服务器上使用sqoop,sqoop在那里工作得很好,所以我确信我在查询中使用了正确的语法。但是当我在测试服务器上运行相同的sqoop命令时,在dev服务器上运行良好的相同sqoop命令在测试服务器中抛出以下错误:2020-08-23 00:52:38689 info[main]sqoop.sqoop:running sqoop version:1.4.6-cdh5.15.1 2020-08-23 00:52:38707 warn[main]tool.basesqooptoop:在命令行上设置密码是不安全的。考虑改用-p。2020-08-23 00:52:38831信息[main]oracle.oraoopmanagerfactory:已禁用用于oracle和hadoop的数据连接器。2020-08-23 00:52:38844 info[main]manager.sqlmanager:使用默认fetchsize 1000 2020-08-23 00:52:38848 info[main]tool.codegentool:开始代码生成2020-08-23 00:52:38,856 error[main]sqoop.sqoop:在org.apache.sqoop.manager.oraclemanager.makeconnection(oraclemanager)中运行sqoop:java.lang.runtimeexception:无法加载db驱动程序类:oracle.jdbc.oracledriver java.lang.runtimeexception:无法加载db驱动程序类:oracle.jdbc.oracledriver。java:290)在org.apache.sqoop.manager.genericjdbcmanager.getconnection(genericjdbcmanager。java:52)在org.apache.sqoop.manager.sqlmanager.execute(sqlmanager。java:762)在org.apache.sqoop.manager.sqlmanager.execute(sqlmanager。java:785)在org.apache.sqoop.manager.sqlmanager.getcolumninfoforrawquery(sqlmanager。java:288)在org.apache.sqoop.manager.sqlmanager.getcolumntypesforrawquery(sqlmanager。java:259)在org.apache.sqoop.manager.sqlmanager.getcolumntypes(sqlmanager。java:245)在org.apache.sqoop.manager.connmanager.getcolumntypes(connmanager。java:333)在org.apache.sqoop.orm.classwriter.getcolumntypes(classwriter。java:1858)在org.apache.sqoop.orm.classwriter.generate(classwriter。java:1657)在org.apache.sqoop.tool.codegentool.generateorm(codegentool。java:106)在org.apache.sqoop.tool.importtool.importtable(importtool。java:494)在org.apache.sqoop.tool.importtool.run(importtool。java:621)在org.apache.sqoop.sqoop.run(sqoop。java:147)在org.apache.hadoop.util.toolrunner.run(toolrunner。java:70)在org.apache.sqoop.sqoop.runsqoop(sqoop。java:183)在org.apache.sqoop.sqoop.runtool(sqoop。java:234)在org.apache.sqoop.sqoop.runtool(sqoop。java:243)在org.apache.sqoop.sqoop.main(sqoop。java:252)
现在,我浏览了论坛,有人说sqoop找不到驱动jar文件。我的jar文件存在于/var/lib/sqoop目录中,在这里我可以看到这些文件:ls-l/var/lib/sqoop total 5392-rw-r-----1 root root 486618 jun 20 2016 csjdbc6.jar-rw-r-----1 root 983914 jun 20 2016 mysql-connector-java-5.1.38-bin.jar-rw-r-----1 root 3397734 jun 20 2016 ojdbc7.jar-rw-r-----1 root 644836 jun 20 2016postgresql-9.4.1208.jre6.jar
这些具有相同访问权限的文件也存在于dev服务器中,sqoop在那里运行良好。当我回显hadoop\u home和sqoop\u home时,它们在dev和test server中都是空的。不确定问题出在哪里:(
暂无答案!
目前还没有任何答案,快来回答吧!