| Author |
MySQL JDBC ConnectionPool Configuration in GrassFish v2.1
|
Paul Okeke
Ranch Hand
Joined: May 16, 2009
Posts: 58
|
|
Am new in JEE, I being working with JavaDB but now I want to have MySQL experience.
I have downloaded and installed MySQL 5.1 and mysql-connector-java-5.1.6-bin.jar.
I set the path to the JDBC Driver in my environment Variable.
In GrassFish Application Server (Connection Pool) i made the following settings.
NAME: MySQLPool
DataSource ClassName: com.mysql.jdbc.jdbc2.optional.MysqlDataSource
Resource Type: javax.sql.DataSource
Port: 3306
databaseName: xxxx
serverName: localhost
URL: jdbc:mysql://localhost:3306/xxxx
password: mypassword
user: root
Every other thing the remained its default value.
The problem is that when I Ping to confirm that the pool is ready for connection it shows an error message:
"Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource"
Please I will appriciate an assistance from any source......
|
OCJP 1.6
|
 |
Balu Sadhasivam
Ranch Hand
Joined: Jan 01, 2009
Posts: 874
|
|
Paul,
Place the mysql jar to the glassfish lib directory and try.
|
 |
Paul Okeke
Ranch Hand
Joined: May 16, 2009
Posts: 58
|
|
I dont know now to Thanks you for kind and useful advice.
But all things being equal, I wish to say a BIG THANK YOU
for your simple advice because that has solved my problem
Once again THANK YOU!!! Balu Sadhasivam
|
 |
Paul Okeke
Ranch Hand
Joined: May 16, 2009
Posts: 58
|
|
Please Balu Sadhasivam I really want to know the secret?
I remember that the last time I tried this with Oracle 10g XE
I eqaully encountered the same problem which forced me to
install the Enterprise Edition but the issue persited.
Hence, I removed Oracle and come to MySQL, it was the re-occurrance
of the same that force send this post.
I read the Sun GrassFish v2.1 Documentation & MySQL Connector-J Documentation
but have not come across this information.
I also have I mind to try out MicroSoft SQL.
Please, can you tell me the secret.
Dose it mean that for any Database I want to connect to using Type 4 driver
that I will Place the JDBC Driver for that Database in the lib folder of my App Server.
Please Tell..
|
 |
 |
|
|
subject: MySQL JDBC ConnectionPool Configuration in GrassFish v2.1
|
|
|