Connection to MySQL does not work in 10.2

Document ID : KB000074474
Last Modified Date : 14/05/2018
Show Technical Document Details
Issue:
I have upgraded a Devtest 9.1 server to version 10.2.  The database connection works fine with Derby.  When I switch to MySQL database as the external DB, the Registry starts and tries to create the Tables,  but only 3 tables get created in MySQL :  ACTIVATION, DRADISCACHE and SEQUENCE ,even though Registry Schema/database  has full DBA privilege and the character set is set to UTF-8

The Registry logs shows the below error message: 
java.lang.AbstractMethodError: com.mysql.jdbc.JDBC4Connection.getSchema()Ljava/lang/String; 
at com.mchange.v2.c3p0.impl.NewProxyConnection.getSchema(NewProxyConnection.java:1668) 
at com.itko.lisa.utils.db.safeguard.impl.TablePrefixModuleChecker.countTablesWithPrefix(TablePrefixModuleChecker.java:79) 
at com.itko.lisa.utils.db.safeguard.impl.TablePrefixModuleChecker.isModuleDatabaseEmpty(TablePrefixModuleChecker.java:57) 
at com.itko.lisa.utils.db.safeguard.DatabaseSafeGuard.checkIfDatabaseCanBeChanged(DatabaseSafeGuard.java:79) 
 
Environment:
DEVTEST 10.2
MYSQL version 5.7.9
Cause:
There were two different versions of MySQL driver in mulitple locations under DEVTEST-HOME folder.  The version of the driver in DEVTEST-Home/lib folder was mysql5.1.8.jar   and DEVTEST-Home/lib/shared folder also had mysql-connector-java-5.1.36-bin.jar .  The mysql5.1.8.jar  is an older version  and its incompatibility with JDK 1.8 version. 


 
Resolution:
Downloaded the latest driver for MySQL 5.7 from the link below:
 https://dev.mysql.com/downloads/connector/j/    -  (mysql-connector-java-5.1.46-bin.jar)
-Replaced the current sql driver jars with the new jar file in  DEVTEST/lib/shared folder. Also removed any extra mysql jar from DEVTEST-HOME folder
-Deleted the three tables ACTIVATION, DRADISCACHE and SEQUENCE from the Registry database  and  cleared the lisatmp10.2 log folder
-Restarted the Registry.
We were now able to get all the tables created fine. 
Additional Information:
MySQL 8 has not yet been certified with DevTest 10.3 and earlier versions.