Glassfish 没有加载com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
包。
抛出以下错误
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)...
我已将 mysql-connector jar 文件复制到lib
Glassfish 的目录中,但仍然出现上述错误。
如何确保 Glassfish 可以为我部署的应用程序找到我的 JDBC 驱动程序?