commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: Which JAR file contains TesterDriver and supporting classes?
Date Fri, 15 Feb 2008 18:43:15 GMT
On 2/15/08, Steve Perkins <> wrote:
>        I'm trying to use JNDI in a standalone application, following
> the example posted at:
>        The example at the bottom of that page runs after I include
> several JAR's in my CLASSPATH (the Sun JNDI JAR's, Commons DBCP, and
> Commons Pool).  However, I'm still getting a ClassNotFoundException at
> runtime, because the test class cannot find
> "org.apache.commons.dbcp.TesterDriver".
>        Based on the package name, one would expect that this class
> would be found within the Commons DBCP JAR.  However, it is not present
> there... and I haven't found it even when going back to older versions
> of that JAR in the archive.
>        Doing a Google search, I found the text for the
> class specifically, and tried putting that source in
> my environment.  However, it in turn has dependencies on other classes
> such as "TesterConnection", etc.  Rather than chase down every single
> dependency class one-by-one, I'd rather figure out what is going on here
> at the root level.  Obviously I am missing some JAR that contains all
> these classes already, can someone point me in the proper direction?
> Thanks in advance!

The example of the web page is from the dbcp unit tests.  Sorry, that
should be made clearer (and in fact the whole example should be
reworked to use a real datasource).  "TesterDriver" and
"TesterConnection" are mock objects used by the unit tests.  You need
to replace the driver class name and url in the example with a real
jdbc driver and connection url for your application.

If you really want to run the example as presented, you need to
compile the unit test classes that can be found in the source
distribution or in the subversion source repository under src/test.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message