JamesBranam's Blog

Friday Aug 28, 2009

Connection Pool Problems for MySQL/GlassFish/OpenSolaris

Hi all,

Last night I spent some time setting up a connection pool in GlassFish's admin console. Here's the backstory: I'm working on a training course for cloud computing, and as part of my module on assembling a virtual data center I ran into a few problems. I have two virtual servers running. One is running OpenSolaris and has GlassFish application server installed on it. The other is running Fedora Linux and has my MySQL database on it. The problems occurred when I tried to ping the database server from GlassFish. I got some strange messages. When a colleague of mine googled the problem, he found out that the problem was OpenSolaris specific. After downloading several .jar files the error message said weren't there, I stumbled upon the solution:

  1. The solution was to copy my regular MySQL driver .jar file from my local machine to the glassfish-install/domains/domain1/lib/ext/ directory on my virtual server.
  2. I typed this: scp -i mykeypair.pem ~/location/of/my.jar root@my-aws-public-dns:/glasssfish/domains/domain1/lib/ext/.
  3. I then restarted GlassFish and the connection pool worked: I was able to ping my database server.

Cheers!

--James

Comments:

Post a Comment:
Comments are closed for this entry.

Calendar

Feeds

Search

Links

Navigation

Referrers