首页 > 代码库 > Sqoop:Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Sqoop:Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Sqoop version:1.4.6-cdh
Hadoop version:2.6.0-cdh5.8.2
场景:使用Sqoop从MSSqlserver导数据
虽然1.4.6的官网说
Even if Sqoop supports a database internally, you may still need to install the database vendor’s JDBC driver in your
$SQOOP_HOME/lib
path on your client. Sqoop can load classes from any jars in$SQOOP_HOME/lib
on the client and will use them as part of any MapReduce jobs it runs; unlike older versions, you no longer need to install JDBC jars in the Hadoop library path on your servers.
我已经把sqljdbc4.jar放到了$SQOOP_HOME/lib下面,但是仍然会报出错误
ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException:
Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriverjava.lang.RuntimeException: Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
尝试着放到 $HADOOP_HOME/lib 下面,仍然不起作用;
最后放到 $HADOOP_HOME/share/hadoop/common/lib 下面OK了。
Sqoop:Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。