Could not load db driver class: oracle.jdbc.OracleDriver

 

$ sqoop export --connect $ORACLE_CONNECT --username ORACLE_USER_NAME --password ORACLE_PASSWORD --table  razor_dw_user_event_log_day --export-dir /user/hive/warehouse/jsb.db/dw_user_event_log_day/pt_cal_number=$cal --fields-terminated-by '\001' -m 1;

· 15/10/14 11:04:33 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver

 

解决:添加oracle驱动

cp /opt/ojdbc6-11.2.0.2.0.jar /usr/share/java/

 

oracle中数据库razor_dw_user_event_log_day表已经创建,但报了如下错误:

15/10/14 12:50:13 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.IllegalArgumentException: There is no column found in the target table razor_dw_user_event_log_day. Please ensure that your table name is correct.

解决:将表名变为大写

razor_dw_user_event_log_day 改为 RAZOR_DW_USER_EVENT_LOG_DAY

你可能感兴趣的:(Could not load db driver class: oracle.jdbc.OracleDriver)