码迷,mamicode.com
首页 > 数据库 > 详细

Sqoop:Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver

时间:2016-10-24 13:48:09      阅读:249      评论:0      收藏:0      [点我收藏+]

标签:blog   出错   数据   port   client   apr   sqlserver   nal   ror   

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.SQLServerDriver java.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

标签:blog   出错   数据   port   client   apr   sqlserver   nal   ror   

原文地址:http://www.cnblogs.com/TiestoRay/p/5992424.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!