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

Posted TiestoRay

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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.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的主要内容,如果未能解决你的问题,请参考以下文章

ImportError: DLL load failed: The specified module could not be found -- IBM DB2

mac qt QMYSQL driver not loaded

iOS 报错信息: dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from:

ios dyld: Library not loaded: @rpath/xxx.framework/xxx 之根本原因

Error:QSqlDatabase: QMYSQL driver not loaded (Qt+C++ 找不到mysql的驱动)

Not allowed to load local resource: 报错解决方法