Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

where to place mysql driver for sqoop action

where to place mysql driver for sqoop action

New Contributor

Having trouble with the mysql driver with sqoop running under oozie on cdh5.1

as documented the directory /var/lib/sqoop/lib was setup and the driver copied there rsync across cluster. I also put it on /opt/cloudera/parcels/CDH/lib/sqoop/lib and uploaded it to the sharelib sqoop

sharelib is enabled.


2014-08-17 16:38:11,924 INFO org.apache.sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.1.0 2014-08-17 16:38:11,949 WARN org.apache.sqoop.tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 2014-08-17 16:38:11,973 WARN org.apache.sqoop.ConnFactory: $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration. 2014-08-17 16:38:12,032 INFO org.apache.sqoop.manager.MySQLManager: Preparing to use a MySQL streaming resultset. 2014-08-17 16:38:12,032 INFO org.apache.sqoop.tool.CodeGenTool: Beginning code generation 2014-08-17 16:38:12,049 ERROR org.apache.sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
1 REPLY 1
Highlighted

Re: where to place mysql driver for sqoop action

Master Guru
For Sqoop running via Oozie, you need to also ensure your MySQL jar(s) are sent along with the action as a <file> addon, or placed in your Application WF's lib/ sub-directory.

Alternatively you can drop it also under the "sqoop" sharelib sub-dir under the latest /user/oozie/share/lib_*/sqoop, but note that this will be overwritten at the next upgrade.
Don't have an account?
Coming from Hortonworks? Activate your account here