GlassFish连接池 [英] GlassFish connection pool
问题描述
我将mysql驱动程序放入glassfish/admin1/lib中,尝试与GlassFish 3.1.2建立连接时出现此错误
i put mysql driver into glassfish/admin1/lib and i get this error on trying make a connection with GlassFish 3.1.2
SingleCRUD_ConnectionPool的Ping连接池失败.类名错误或未为以下项设置类路径:com.mysql.jdbc.jdbc2.optional.MysqlDataSource请检查server.log以获取更多详细信息.
Ping Connection Pool failed for SimpleCRUD_ConnectionPool. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.
进行配置:
池名称:SimpleCRUD_ConnectionPool 资源类型:javax.sql.DataSource javax.sql.XADataSource 数据源类名称:com.mysql.jdbc.Driver
Pool Name: SimpleCRUD_ConnectionPool Resource Type: javax.sql.DataSource javax.sql.XADataSource Datasource Classname: com.mysql.jdbc.Driver
有人有什么主意吗?
推荐答案
驱动程序和数据源不相同.从您的配置来看,您是否将Driver类设置为DataSource类名?
A Driver and a DataSource are not the same. It looks from your configuration that you're setting a Driver class as the DataSource classname?
您真的需要XA吗?您正在进行任何分布式交易吗?
Do you really need XA? Are you doing any distributed transaction?
如果是这样,请将数据源设置为com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
If so, set the data source to com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
如果没有,请选择常规数据源类型,然后将类名称设置为com.mysql.jdbc.jdbc2.optional.MysqlDataSource
If not, select a regular DataSource type and then set the classname to com.mysql.jdbc.jdbc2.optional.MysqlDataSource
这篇关于GlassFish连接池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!