Tried to setup the connection pool for mysql in Glassfish today. The
following error occurs when I tried to ping the connection pool.
Error Message
Ping
Connection Pool failed for XXX Class name is wrong or classpath is not
set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the
server.log for more details.
Solution
1. Download Connector / J
http://dev.mysql.com/downloads/connector/j/
2. Put it in the glassfish's lib folder
3. Restart the server
4. Ping Successfully!
MySQL, Glassfish 4, Connection Pool Setup