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]>

Reply via email to