My Oracle Support Banner

Creating a DataSource for MySQL Database Fails Due to "java.lang.ClassNotFoundException: Cannot load driver: com.mysql.jdbc.jdbc2.optional.MysqlDataSource" (Doc ID 2663390.1)

Last updated on APRIL 27, 2020

Applies to:

Oracle WebLogic Server - Version 12.2.1.3.0 and later
Information in this document applies to any platform.

Symptoms

Unable to create datasource for MySQL database due to "java.lang.ClassNotFoundException: Cannot load driver: com.mysql.jdbc.jdbc2.optional.MysqlDataSource".

In AdminServer.log, the below error can be noticed:

 

Changes

 Creating a new datasource for MySQL database.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.