API Gateway doesn't start up with MySQL Connector/J 8.0

book

Article ID: 141359

calendar_today

Updated On:

Products

CA API Gateway API SECURITY

Issue/Introduction

API Gateway doesn't start up if the mysql-connector-java.jar of MySQL Connector/J 8.0 is added to the runtime libraries.The following message is recorded in the ssg log.

 

2019-12-06T21:59:19.684+0900 WARNING 19 STDERR: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2019-12-06T21:59:46.666+0900 SEVERE  12 com.l7tech.server.boot.GatewayBoot: WARNING: No database connections open after 30 seconds; possible DB connection failure?

Cause

The old class name 'com.mysql.jdbc.Driver' of MySQL Connector/J 5.1 is depreciated when the new driver (MySQL Connector/J 8.0) is loaded into the API Gateway.

Environment

Release : 9.1

Component : API GATEWAY

Resolution

MySQL Connector/J 5.1.46 is included in the API Gateway 9.3 and above. According to the release notes of the version 5.1.46, it can connect to MySQL 8.0.