本文介绍了Glassfisch MySQL ping错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个glassfish服务器,我尝试使用mysql数据库.

i have an glassfish server and i try to use a mysql database.

我做了什么:

  • 我安装了glassfisch3
  • 我将galssfish3/bin添加到环境变量中
  • 我安装了一个域和glassfish3/glassfish/domains/domain1
  • 我将mysql-connector-java-5.1.25-bin.jar添加到glassfish3/glassfish/domains/domain1/lib
  • 我在我的glassfisch中创建了一个数据源(名称:myDataSource,ClassName com.mysql.jdbc.jdbc2.optional.MysqlDataSource,资源类型:javax.sql.DataSource)
  • 我保存了一切

当我现在转到新创建的数据源并按ping按钮时,我出现此错误:

When i now go to my new created datasource and press the ping button i get this Error:

Ping Connection Pool failed for movies. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.

那它怎么了? glassfisch3官方文件说我做对了

So whats wrong with it? official glassfisch3 doc says i did right

推荐答案

我想,通过创建数据源,您的意思是连接池.您是从命令行还是从IDE启动Glassfish?当我从Netbeans 7.3.1(Linux)启动它时,我也遇到了Glassfish 4的相同问题,但是当我启动它时,

I guess, by creating a datasource you mean a connection pool.Do you start your Glassfish from a command line or from an IDE?I had the same problem with Glassfish 4 when I was starting it from Netbeans 7.3.1 (Linux), but when I start it by

./bin/asadmin start-domain

它可以找到驱动程序.我不知道使用Netbeans时出什么毛病.

it can find the driver. I don't know what gets wrong when using Netbeans.

这篇关于Glassfisch MySQL ping错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 00:00