Glassfish does not load the package com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
.
The following error is raised:
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for:com.mysql.jdbc.jdbc2.optional.MysqlXADataSource Error Code: 0 at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy (EntityManagerSetupImpl.java:517)...
I copied the mysql connector file jar file to the Glassfish lib
directory, but I still get the above error.
How can I ensure that Glassfish can find my JDBC driver for my deployed application?
source share