Sqoop: ERROR manager.SqlManager: Error reading from database: java.sql.SQLException:

When I try to import data from mysql to HDFS using Sqoop and run the following command

sqoop import --connect jdbc: mysql: // IP address / database name - root username - password password - table table name --m 1

I am getting below error

ERROR manager.SqlManager: Error reading from database: java.sql.SQLException: Streaming result set com.mysql.jdbc.RowDataDynamic@555b6c34 is still active. No statements can be issued when any stream result sets are open and in use on a given connection. Make sure you call .close () on any active streaming result sets before trying to get additional requests.

I can't figure out what it is and have looked at many websites for solutions but didn't even get it.

Please suggest.

+3


source to share


3 answers


Try to give the driver name, it worked for me

--driver com.mysql.jdbc.Driver 

      



Worked for me. Thankyou.

+7


source


a quick google search on your exception gives me the impression that this is the bug reported in sqoop. It looks like they allowed it. Take a look at this https://issues.apache.org/jira/browse/SQOOP-1400

.



Check your version of sqoop and mysql connector and update to a newer version if necessary. Thank.

+2


source


My problem was solved after using:

--driver com.mysql.jdbc.Driver

      

in the sqoop script.

eg.

sqoop import --connect jdbc:mysql://IP Address/database name --username root --password password --table table name --m 1 --driver com.mysql.jdbc.Driver

      

+2


source