Thread: JDBC 2 question --- NoClassDefFoundError in Poolman

JDBC 2 question --- NoClassDefFoundError in Poolman

From
이주형
Date:
Hi , you guys
 
I am in a trouble with a NoClassDefFoundError when executing Poolman sample file.
(Poolman is a connection pool manager that is said to be a good one, isn't it)
 
My system is Compaq DL320,
OS : Redhat Linux 7.1
JDK : sun jdk1.3.1(j2se) + JDBC2 optional package ( jdbc2_0-stdext.jar -- CLASSPATH includes this)
POOL MANAGER : Poolman-2.0.4 ( I did installation as in README )
DB : Postgresql-7.1.2
and I use jdbc driver when I compiled postgresql. - postgresql.jar(CLASSPATH also includes this)
 
poolman sample file compiled fine but didn't execute
$ javac PoolManSample.java - OK
 
$ java PoolManSample "select * from test_table" "mydb"

Executing sample of SQLUtil executing SQL from the specified database:
 
Exception in thread "main" java.lang.NoClassDefFoundError: javax/sql/ConnectionEventListener
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at com.codestudio.util.SQLUtil.getSQLManager(SQLUtil.java:178)
        at com.codestudio.util.SQLUtil.executeSql(SQLUtil.java:215)
        at com.codestudio.util.SQLUtil.execute(SQLUtil.java:153)
        at PoolManSample.doSQL(PoolManSample.java:54)
        at PoolManSample.main(PoolManSample.java:333)
 
In addition , my java VM doesn't find methods of JDBC2 classes.  ( CLASSPATH includes all jar files)
but it find them well in Redhat Linux 7.0.
 
It makes me crazy. help !!!
 
ps. Is there anyone who use poolman with postgresql ?