Struggling to create MySQL Connection Pool on Glassfish

╄→尐↘猪︶ㄣ 提交于 2019-12-10 16:13:25

问题


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;
  • password: mypassword;

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

Thanks in advance!


回答1:


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

(or a different domain name if you don't use the default domain1)



来源:https://stackoverflow.com/questions/10413090/struggling-to-create-mysql-connection-pool-on-glassfish

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!