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. Due to licensing issues, this cannot be included in CloudStack (maven/war/pkg), therefore is listed as dependency in packaging. For example:
https://github.com/apache/cloudstack/blob/master/packaging/centos63/cloud.spec#L74 https://github.com/apache/cloudstack/blob/master/debian/control#L18 This is NOT anything new. The reported error usually occurs, when the installed dependency jar (from distro's repo) is not in the CLASSPATH. Likely issues are that either the package (or equivalent pkg, could be different name depending on the platform for example on OSX I'm not sure what provides it etc.) is not installed or the installed jar is not in the classpath. Regards. ________________________________________ From: Paul Angus <paul.an...@shapeblue.com> Sent: 17 May 2016 21:50:33 To: dev@cloudstack.apache.org Subject: RE: MySQL : No suitable driver found for jdbc:mysql Hi Rohit, Please could you explain why user installation of libmysql-java is required. Kind regards, Paul Angus paul.an...@shapeblue.com www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue rohit.ya...@shapeblue.comĀ www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue -----Original Message----- From: Rohit Yadav [mailto:rohit.ya...@shapeblue.com] Sent: 17 May 2016 17:13 To: dev <dev@cloudstack.apache.org> Subject: Re: MySQL : No suitable driver found for jdbc:mysql Nick, install libmysql-java or equivalent pkg and make sure the jar is in classpath. Regards. rohit.ya...@shapeblue.com www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue On Tue, May 17, 2016 at 6:04 AM -0700, "Nick LIVENS" <nick.liv...@nuagenetworks.net<mailto:nick.liv...@nuagenetworks.net>> wrote: 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(DriverManager.java:596) at java.sql.DriverManager.getConnection(DriverManager.java:215) at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106) at com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:202) at com.cloud.utils.db.Merovingian2.<init>(Merovingian2.java:68) at com.cloud.utils.db.Merovingian2.createLockMaster(Merovingian2.java:88) 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 /usr/share/java/mysql-connector-java.jar java 14064 cloud 38r REG 253,1 883899 134860304 /usr/share/java/mysql-connector-java.jar 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: 7.0.54.0 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? Thanks! Kind regards, Nick Livens