Sqoop Import issue

#1

Helo ,
I am able to run sqoop list-databases ,list-tables,eval and getting the result.
But when I try to run "sqoop import " I am getting the below error

Command
sqoop import
–connect “jdbc:mysql://quickstart.cloudera:3306/retail_db”
–username=retail_dba
–password=cloudera
–table departments
–as-textfile
–target-dir=/user/cloudera/departments

Error :-
16/12/19 14:16:41 ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@4752d5de is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.
java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@4752d5de is still active. No statements may be issued when any streaming result sets are open and in use on a given connection. Ensure that you have called .close() on any active streaming result sets before attempting more queries.

Please advise

0 Likes

#2

It is due to old mysql connector. You have to pass driver class or update mysql jdbc jar.

--driver com.mysql.jdbc.Driver

0 Likes