努力在Glassfish上创建MySQL连接池 [英] Struggling to create MySQL Connection Pool on Glassfish

查看:292
本文介绍了努力在Glassfish上创建MySQL连接池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前完成了这个工作,但由于某种原因,我在创建这个连接池时遇到了一些困难。当我在创建连接池后对其进行ping操作时,出现以下错误:

I've done this before but for some reason I'm really having some difficulty creating this connection pool. When I ping the connection pool after creating it I get this error:

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

我在创建池时提供的信息如下所示:

The info I've provided in the creation of the pool is as follows:


  • portNumber :3306;

  • databaseName :bondsaverdb;

  • serverName :localhost;

  • user :root;

  • 密码:mypassword;

  • portNumber: 3306;
  • databaseName: bondsaverdb;
  • serverName: localhost;
  • user: root;
  • password: mypassword;

我有什么遗漏了吗?任何我拼写错误或输入错误?

Is there anything I've left out? Anything I misspelled or inputted incorrectly?

预先感谢!

推荐答案

似乎是一个类路径问题。你的域名lib目录中有mysql连接器吗?

Seems to be a classpath issue. Do you have the mysql connector in your domain's lib dir?

正确的路径应该是:

The correct path should be:


glassfish-install-dir \glassfish\domains\domain1\lib

glassfish-install-dir\glassfish\domains\domain1\lib



< (或不同的域名,如果你不使用默认的 domain1

这篇关于努力在Glassfish上创建MySQL连接池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆