2012-05-02 39 views
4

我之前完成了這個任務,但由於某種原因,我確實在創建這個連接池時遇到了一些困難。當我創建後ping通連接池我得到這個錯誤:努力在Glassfish上創建MySQL連接池

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. 

我在創建池提供的信息如下:

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

有什麼我遺漏了嗎?任何我拼寫錯誤或輸入錯誤的東西?

在此先感謝!

回答

4

似乎是一個類路徑問題。你的域的lib目錄中有mysql連接器嗎?

正確的路徑應該是:

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

(或不同的域名,如果你不使用默認的DOMAIN1

+0

啊。 Damit。我確實有連接器是的,但是我知道我把連接器放在我的機器上有錯誤的glassfish實例中。謝謝你指點我在正確的方向馬特。非常感激! – Tiwaz89

+0

很高興聽到它的作品! –