users@glassfish.java.net

setting CLASSPATH for a connection pool to Postgresql

From: <glassfish_at_javadesktop.org>
Date: Wed, 24 Mar 2010 15:16:17 PDT

I have GlassfishV3 installed and am trying to ping to a PostgreSql database. This is RedHat Linux 5.4, so I used the YUM feature to install the postgresql-jdbc drivers for Glassfish to use over a connection pool to ping to the PostgreSql database. I edited the /home/Jerry/.bash_profile file to set the CLASSPATH=/usr/share/java/postgresql-jdbc.jar which is the jar file containing the necessary classes in the location that YUM placed it. I exported CLASSPATH and checked that it is set. When I tried to ping, I got the following error "Ping failed Exception - Class name is wrong or classpath is not set for: org.postgresql.ds.PGSimpleDataSource"

Is the .jar file in the wrong place to work? Do I have to unpack it? (tried that). Any ideas will be most appreciated.

-Jerry
[Message sent by forum member 'grj99']

http://forums.java.net/jive/thread.jspa?messageID=393580