cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Angus <>
Subject RE: MySQL : No suitable driver found for jdbc:mysql
Date Wed, 18 May 2016 06:40:40 GMT
Thanks Rohit,

I see what you're saying.
The conversation was actually based on your statement 'Nick, install libmysql-java or equivalent
pkg' to which I asked why a user would have to install an apparently additional component
(Nick had already said that mysql-connector-java.jar was loaded).

The conversation then spiralled out of control.

Kind regards,

Paul Angus

53 Chandos Place, Covent Garden, London  WC2N 4HSUK

-----Original Message-----
From: Rohit Yadav [] 
Sent: 18 May 2016 03:51
Subject: Re: MySQL : No suitable driver found for jdbc:mysql

53 Chandos Place, Covent Garden, London  WC2N 4HSUK @shapeblue

On May 17 2016, at 11:33 pm, Paul Angus <> wrote:


On CentOS 7 I get

[root@localhost ~]# yum install libmysql-java

This is incorrect, perhaps you did not read my email:
"The mysql-connector-java (on centos) or libmysql-java (on debian) package provides the jar
dependency that understands jdbc and is necessary for CloudStack to communicate with MySQL,
execute operations etc."

The libmysql-java is the package name on debian/ubuntu, I said libmysql-java or 'equivalent'
as I don't know what environment Nick was running. On CentOS, the same package that provides
the mysql-java client/jar dependency is called 'mysql-connector-java'.

The hullabulla raised around packaging dependency, is a non-issue.

Based on what Nick has shared, his environment has oracle-java and not openjdk -- it is likely
a case of missing classpath, JAVA_HOME and java jdk directory path issue in the initd/systemd


Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 25 kB 00:00:00
epel | 4.3 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/3): epel/x86_64/group_gz | 170 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 555 kB 00:00:00
(3/3): epel/x86_64/primary_db | 4.1 MB 00:00:00
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
No package libmysql-java available.
Error: Nothing to do
[root@localhost ~]#

Kind regards,

Paul Angus
53 Chandos Place, Covent Garden, London WC2N 4HSUK

-----Original Message-----
From: Rohit Yadav []
Sent: 17 May 2016 18:15
Subject: Re: MySQL : No suitable driver found for jdbc:mysql

Nick, assuming it's a CentOS environment can you run cloudstack-setup-databases (again), make
sure that database IP and cluster node IP parameters in are correct, and finally
check that the jar is in the classpath in the initd/systemd script (check JAVA_HOME, jdk dirs
etc.). Also watchout for errors in the logs.

Oracle-java is not available from default repositories, in that case you may need to fix JAVA_HOME
and jdk paths in initd scripts.

From: Nick LIVENS <>
Sent: 17 May 2016 18:34:38
Subject: MySQL : No suitable driver found for jdbc:mysql

Hi all,

I'm facing the following issue when installing ACS 4.9.0 (current master).
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/cloud?autoReconnect=true&prepStmtCacheSize=517&cachePrepStmts=true
        at java.sql.DriverManager.getConnection(
        at java.sql.DriverManager.getConnection(

First, I thought that the mysql-connector-java.jar was not loaded / installed correctly. But
this jar is loaded :
[root@csc-1 java]# lsof -p 14064 | grep jar | grep mysql
java 14064 cloud mem REG 253,1 883899 134860304
java 14064 cloud 38r REG 253,1 883899 134860304

Tomcat specifics :
[root@csc-1 java]# tomcat version
Server version: Apache Tomcat/7.0.54
Server built: Mar 24 2015 07:49:05
Server number:
OS Name: Linux
OS Version: 3.10.0-229.7.2.el7.x86_64
Architecture: amd64
JVM Version: 1.7.0_85-mockbuild_2015_07_11_12_24-b00
JVM Vendor: Oracle Corporation

Does anyone have an idea why I might be facing this issue?


Kind regards,
Nick Livens
53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue
View raw message