3
votes

When I am trying to import data from mysql to HDFS using Sqoop and running the following command

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

I am getting the 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 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.

I am unable to understand what it is and browsed many websites for solutions but did not even got a clue.

Please suggest.

3
Possible duplicate of sqoop import issue with mysql - Claudio

3 Answers

7
votes

Try mentioning driver name, It worked for me

--driver com.mysql.jdbc.Driver 

Worked for me. Thankyou.

3
votes

a quick google search on your exception gives me an impression that this was a bug reported in sqoop. It looks like they have resolved it. Please look at this https://issues.apache.org/jira/browse/SQOOP-1400.

Verify your sqoop and mysql connector version and update to newer version if required. Thanks.

2
votes

My issue was resolved after using:

--driver com.mysql.jdbc.Driver

in sqoop script.

e.g.

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