Solved

getting jdbc to work on a mac os

Posted on 2011-03-03
3
1,040 Views
Last Modified: 2012-05-11
Hi...

I used sudo port install mysql-connector-java to install a mysql connectory for jdbc.

Whe I try and execute this command...

sqoop import --connect jdbc:mysql://ubuntu@xxxxx.com/testdb1 --table test -m 1

I get this error

11/03/04 16:47:45 INFO tool.CodeGenTool: Beginning code generation
11/03/04 16:47:45 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver
      at com.cloudera.sqoop.manager.SqlManager.makeConnection(SqlManager.java:597)
      at com.cloudera.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:51)
      at com.cloudera.sqoop.manager.MySQLManager.execute(MySQLManager.java:201)
      at com.cloudera.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:177)
      at com.cloudera.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:161)
      at com.cloudera.sqoop.orm.ClassWriter.generate(ClassWriter.java:908)
      at com.cloudera.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:82)
      at com.cloudera.sqoop.tool.ImportTool.importTable(ImportTool.java:337)
      at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:423)
      at com.cloudera.sqoop.Sqoop.run(Sqoop.java:144)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
      at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
      at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:218)
      at com.cloudera.sqoop.Sqoop.main(Sqoop.java:228)

How to I fix so I can use jdbc

I also have the jar fle from the mysql website.
0
Comment
Question by:dmontgom
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 35033965
you need to add the (installed) jars to your classpath
0
 
LVL 92

Expert Comment

by:objects
ID: 35033970
you can achieve that by copying the jat to $SQOOP_HOME/lib
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 35034748
Copy the mysql driver jar to the lib/ext directory of your active java runtime
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
In this video tutorial I show you the main steps to install and configure  a VMware ESXi6.0 server. The video has my comments as text on the screen and you can pause anytime when needed. Hope this will be helpful. Verify that your hardware and BIO…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question