Please help!
Cannot get Sqoop to work: error on the com.mysql.jdbc.Driver class driver.
I followed the instructions in the O'Reilley Sqoop book on loading the jar
file as best as I could: but those instructions call for placing the .jar
file in the /lib directory for Sqoop. HOWEVER, the Cloudera 5 installation
I'm running doesn't have a /lib directory, and the /conf file is a pointer
to a Cloudera set of configurations. I went so far as to put the class
driver and pointer to the .jar file into the Cloudera
/opt/--/sqoop.properties file.(And I definitely re-started the Sqoop2 server
every time I made a change). Still doesn't work. Following is the output
from the sqoop import script from Ch. 2 of O'Reilley Sqoop book.
Does anybody know what I need to do to get this driver class
The tables are all created and populated from the SQL script made available
by the authors via github.
sqoop import --connect jdbc:mysql://mysql.example.com/sqoop --username root
--table cities
Warning:
/opt/cloudera/parcels/CDH-5.1.0-1.cdh5.1.0.p0.53/bin/../lib/sqoop/../ac
cumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
14/07/24 18:23:28 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.1.0
14/07/24 18:23:28 INFO manager.MySQLManager: Preparing to use a MySQL
streaming
resultset.
14/07/24 18:23:28 INFO tool.CodeGenTool: Beginning code generation
14/07/24 18:23:29 ERROR sqoop.Sqoop: Got exception running Sqoop:
java.lang.Runt
imeException: Could not load db driver class: com.mysql.jdbc.Driver
java.lang.RuntimeException: Could not load db driver class:
com.mysql.jdbc.Drive
r
at
org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:797)
at
org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbc
Manager.java:52)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:685)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:708)
at
org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(Sqlger.java:24
3)
at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:22 6)
at
org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:347)
at
org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1305)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1110)
at
org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
Signature0001
Sean Franks
"With the addition of a well structured Big Data ecosystem to the Data
Highway of an enterprise, Business Intelligence analytics will take a
quantum leap forward."