<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: sqoop import error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177290#M139540</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following link talks about it in more detail:   &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_data-movement-and-integration/content/apache_sqoop_connectors.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_data-movement-and-integration/content/apache_sqoop_connectors.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Fri, 09 Mar 2018 07:19:43 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2018-03-09T07:19:43Z</dc:date>
    <item>
      <title>sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177287#M139537</link>
      <description>&lt;P&gt;I am trying to import a table named 'widgets' in the data base 'Testdb' with the command below:&lt;/P&gt;&lt;P&gt;$sqoop import --connect jdbc:mysql://hadoop/Testdb --table widgets -m 4 -username root -P&lt;/P&gt;&lt;P&gt;I get the error "Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver"&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:02:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177287#M139537</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177288#M139538</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/47296/aymenrahal007.html"&gt;Aymen Rahal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you copy the JDBC driver (mysql-connector-java*) to the $SQOOP_HOME/lib directory of your Sqoop installation.?&lt;/P&gt;&lt;P&gt;Then re-run the command&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:13:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177288#M139538</guid>
      <dc:creator>Shelton</dc:creator>
      <dc:date>2018-03-09T07:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177289#M139539</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You will need to download the mysql-connector-java (MySQL JDBC driver) and then put it to the following location:&lt;/P&gt;&lt;PRE&gt; # cp -f /usr/share/java/mysql-connector-java.jar  /usr/hdp/current/sqoop-client/lib/&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt; The you can run the Sqoop command something like following:&lt;/P&gt;&lt;PRE&gt; # su -l sqoop -c "sqoop import --connect jdbc:mysql://hadoop/Testdb --table widgets -m 4 --username root --password CHANGEME --driver com.mysql.jdbc.Driver"&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:17:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177289#M139539</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177290#M139540</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following link talks about it in more detail:   &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_data-movement-and-integration/content/apache_sqoop_connectors.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.4/bk_data-movement-and-integration/content/apache_sqoop_connectors.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:19:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177290#M139540</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177291#M139541</link>
      <description>&lt;P&gt;$ls -ltr /usr/share/java/mysql-connector-java-5.1.17.jar &lt;/P&gt;&lt;P&gt;ls: cannot access '/usr/share/java/mysql-connector-java-5.1.17.jar': No such file or directory&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:24:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177291#M139541</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177292#M139542</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you do not have the mysql driver in your host then please install it as following:&lt;/P&gt;&lt;PRE&gt;# yum install mysql-connector-java*
# cp -f /usr/share/java/mysql-connector-java.jar  /usr/hdp/current/sqoop-client/lib/&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;If you do  not want to use "yum" to install mysql-connector-java then you can also download the tar archive of the connector from the following site and then put the extracted JAR (&lt;STRONG&gt;mysql-connector-java*.jar&lt;/STRONG&gt;) inside the  "usr/hdp/current/sqoop-client/lib/"&lt;/P&gt;&lt;P&gt;&lt;A href="https://dev.mysql.com/downloads/connector/j/" target="_blank"&gt;https://dev.mysql.com/downloads/connector/j/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:26:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177292#M139542</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177293#M139543</link>
      <description>&lt;P&gt;$ cp -f /usr/share/java/mysql-connector-java.jar  /usr/hdp/current/sqoop-client/lib/ &lt;/P&gt;&lt;P&gt;cp: '/usr/share/java/mysql-connector-java.jar' and '/usr/hdp/current/sqoop-client/lib/mysql-connector-java.jar' are the same file&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:38:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177293#M139543</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177294#M139544</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Do you see the following symlink exist with the following user permission:&lt;/P&gt;&lt;PRE&gt;# ls -l /usr/hdp/current/sqoop-client/lib/mysql-connector-java.jar
lrwxrwxrwx. 1 root root 40 Jun  9  2017 /usr/hdp/current/sqoop-client/lib/mysql-connector-java.jar -&amp;gt; /usr/share/java/mysql-connector-java.ja&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also do you see the following command shows the class found?&lt;/P&gt;&lt;PRE&gt;# jar -tvf /usr/share/java/mysql-connector-java.jar | grep 'com.mysql.jdbc.Driver' 
   919 Tue Jan 01 00:00:00 UTC 1980 com/mysql/jdbc/Driver.class&lt;/PRE&gt;&lt;P&gt;.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:48:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177294#M139544</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177295#M139545</link>
      <description>&lt;P&gt;#su -l sqoop -c "sqoop import --connect jdbc:mysql://hadoop/Testdb --table widgets -m 4 --username root --password CHANGEME --driver com.mysql.jdbc.Driver"&lt;/P&gt;&lt;P&gt;com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:48:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177295#M139545</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177296#M139546</link>
      <description>&lt;P&gt;Now the error says that it is not able to communicate with MySQL server.&lt;/P&gt;&lt;P&gt;So please check if your mysql server is running file and listening to "hadoop:3306" port&lt;/P&gt;&lt;PRE&gt;# netstat -tnlpa | grep 3306
# hostname -f
# ps -ef | grep mysql
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also please check if there is any issue/error logged in mysql log.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:50:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177296#M139546</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177297#M139547</link>
      <description>&lt;P&gt;The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:50:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177297#M139547</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177298#M139548</link>
      <description>&lt;P&gt;everything is ok, may be i have to add the port to jdbc:mysql://hadoop:3306 right ?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:55:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177298#M139548</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T07:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177299#M139549</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Yes 3306 is the default port for MySQL.&lt;/P&gt;&lt;P&gt;So better to add it in the URL.&lt;/P&gt;&lt;PRE&gt;# sqoop import --connect jdbc:mysql://hadoop:3306/Testdb --table widgets -m 4 --username root --password CHANGEME --driver com.mysql.jdbc.Driver&amp;lt;br&amp;gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Also please check if you are able to login to MySQL using command line or not?&lt;/P&gt;&lt;PRE&gt;# mysql -u root -p&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 07:58:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177299#M139549</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T07:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177300#M139550</link>
      <description>&lt;P&gt;I get this error:&lt;/P&gt;&lt;P&gt;18/03/09 01:01:51 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1659)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:488)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 08:04:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177300#M139550</guid>
      <dc:creator>krol</dc:creator>
      <dc:date>2018-03-09T08:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: sqoop import error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177301#M139551</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;@Aymen Rahal&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The current error is completely different from the one which was mentioned in the original thread so it might confuse the users who hit the same issue described in the Original thread.&lt;/P&gt;&lt;PRE&gt;Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter at org.apache.sqoop.orm.ClassWriter.generat&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Hence i will request you to please mark this HCC thread as "answered" by clicking on the "Accept" button and then open a new thread with the current error. Thats helps many community users to quickly find one specific error with one specific answer.&lt;BR /&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47296/aymenrahal007.html" nodeid="47296"&gt;&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 08:05:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/sqoop-import-error/m-p/177301#M139551</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2018-03-09T08:05:55Z</dc:date>
    </item>
  </channel>
</rss>

