commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amar Das <a...@tpmc.com>
Subject dbcp: error message
Date Wed, 22 Jan 2003 16:33:57 GMT
Hi,
I compiled ManualPoolingDriverExample.java. Before compiling, I put 
commons-dbcp.jar, commons-pool.jar and commons-collections.jar under 
\lib\ext directory of JDK (1.4). I also renamed class12.zip ( oracle jdbc 
driver) to oracle-jdbc.jar. The code compiles fine. But when I try to run 
it using the following command it fails to create a database connection. 
Please help.
Thank you,
-- amar

C:\java\classes>java ManualPoolingDriverExample 
"jdbc:oracle:thin:smms/password@myserver:1521:smms" "
SELECT * FROM DUAL"
Setting up driver.
Done.
Creating connection.
Exception in thread "main" org.apache.commons.dbcp.DbcpException: 
java.sql.SQLException: No suitable driver
at 
org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFa
ctory.java:101)
at 
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:184)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
at org.apache.commons.dbcp.PoolingDriver.connect(PoolingDriver.java:146)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:199)
at ManualPoolingDriverExample.main(ManualPoolingDriverExample.java:153) 


Mime
View raw message