JDBC driver cannot be found. Unable to find the JDBC database jar on host

hadoop

#1

Hi all

when testing the connection to my mySQL databases in cloudera i am gettin gthe below error:

JDBC driver cannot be found. Unable to find the JDBC database jar on host

I have spun up a Centos EC2 instance and have followed the https://www.youtube.com/watch?v=ucchoODqduw&feature=youtu.be - setup Cloudera manager video.

I have registered for the CCA175 course on Udemy. Can anyone assist with this error?


#2

anyone know how to download the jdbc driver and set up the classpath on centos ec2?


#3

Can you try the below command in centos:

sudo yum -y install mysql-connector-java


#4

thanks Vinod - that worked - appreciate you assisting. I can now move on with the tutorial! Have a good day


#5

Hello Vinod, I have run into another issue - when I type the command hadoop fs - ls I get the below error

Exception in thread “main” java.lang.UnsupportedClassVersionError: org/apache/hadoop/fs/FsShell : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: org.apache.hadoop.fs.FsShell. Program will exit.

on my ec2 instance I see [root@ip-******* ~]# $JAVA_HOME
-bash: /etc/alternatives/jre: is a directory which doesnt look right

I have a jdk in the following directory - /usr/java/jdk1.7.0_67-cloudera/bin - shall I set JAVA_HOME to this in bash_profile?

thanks for any assistance


#6

Yes, Can you just try setting JAVA_HOME?