Thanks Pete.

I corrected the spelling of the zip file, but I still got the error.

Adding this line corrected my problem.
Class.forName( "COM.ibm.db2.jdbc.net.DB2Driver" );

Thanks.

At 08:43 AM 7/23/2002 -0700, you wrote:
>A thought.... At least for my db2 stuff, the drivers are in a jar called
>db2java.zip, not dbjava2.zip. Could the misspelling be the reason for the no
>suitable driver error?
>
>DBCP works great (for me) w/ DB2, btw.
>
>-pgm
>
>
>
>-----Original Message-----
>From: Bob Reardon [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, July 23, 2002 7:29 AM
>To: [EMAIL PROTECTED]
>Subject: DBCP Compatible drivers
>
>
>Hello all,
>
>
>I am trying to test the DBCP sample
>apps:  ManualPoolingDataSourceExample.java and
>ManualPoolingDriverExample.java with our DB2 database, and I am getting the
>following error when I run either test app
>
>Buildfile: build.xml
>
>build:
>
>run:
>       [java] Setting up data source.
>       [java] Done.
>       [java] Creating connection.
>
>BUILD FAILED
>
>C:\commons-dbcp-old\doc\build.xml:23: java.lang.RuntimeException:
>java.sql.SQLEx
>ception: No suitable driver
>
>Here is the code from my build.xml file that I use to run the two test apps:
>
>     <target name="run-1" depends="build">
>
>        <java classname="ManualPoolingDataSourceExample" >
>           <arg line="-Djdbc.drivers=COM.ibm.db2.jdbc.net.DB2Driver" />
>           <classpath>
>              <pathelement path="${dbcp}" />
>              <pathelement location="${dbcp}/commons-dbcp.jar" />
>              <pathelement location="${dbcp}/commons-collections.jar" />
>              <pathelement location="${dbcp}/commons-pool.jar" />
>              <pathelement location="${dbcp}/j2ee.jar" />
>              <pathelement location="${dbcp}/dbjava2.zip" />
>           </classpath>
>        </java>
>     </target>
>
>     <target name="run-2" depends="build">
>
>        <java classname="ManualPoolingDriverExample" >
>           <arg line="-Djdbc.drivers=COM.ibm.db2.jdbc.net.DB2Driver" />
>           <classpath>
>              <pathelement path="${dbcp}" />
>              <pathelement location="${dbcp}/commons-dbcp.jar" />
>              <pathelement location="${dbcp}/commons-collections.jar" />
>              <pathelement location="${dbcp}/commons-pool.jar" />
>              <pathelement location="${dbcp}/j2ee.jar" />
>              <pathelement location="${dbcp}/dbjava2.zip" />
>           </classpath>
>        </java>
>     </target>
>
>The Jar files for commons-pool, commons-collections and commons-dbcp were
>downloaded this morning from the jakarta-commons site.
>
>Does commons-dbcp support DB2 or do I have something with my build.xml file?
>
>Thanks,
>
>
>Bob
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>

Bob Reardon
Administrative Information Systems
Information Technology Services
300 University Services Building
Iowa City, IA 52242-1933
319-335-6388
319-335-6385 fax
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to