Web app running on Tomcat unable to find JDBC driver

I'm running a Web application on Tomcat that is using the P6SPY JDBC driver.  The driver is not being found by app generating the error messages shown below.  I inherited this application from a developer who left.  There is no JDBC configuration info in the web.xml file.  There is info in the repository_database.xml file that configures the  driver but that is all I can find.  Any suggestions as to a solution?
at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl.checkOutJdbcConnection(Unknown Source)
      at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.lookupConnection(Unknown Source)
      at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection(Unknown Source)
      ... 41 more
Caused by: org.apache.ojb.broker.accesslayer.LookupException: Error getting Connection from DriverManager with url (jdbc:oracle:thin:@eos.nih.gov:6202:nidbtst) and driver (com.p6spy.engine.spy.P6SpyDriver)
      at org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.newConnectionFromDriverManager(Unknown Source)
      at org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl$ConPoolFactory.makeObject(Unknown Source)
      at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
      ... 44 more
Caused by: java.sql.SQLException: No suitable driver
      at java.sql.DriverManager.getConnection(DriverManager.java:545)
      at java.sql.DriverManager.getConnection(DriverManager.java:140)
      ... 47 more
org.apache.ojb.broker.PersistenceBrokerException: Used ConnectionManager instance could not obtain a connection
      at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStatement(Unknown Source)
      at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown Source)
      at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown Source)
      at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source)
      at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unknown Source)
      at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(Unknown Source)
      at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery(Unknown Source)
      at org.apache.ojb.broker.core.PersistenceBrokerImpl.getObjectByQuery(Unknown Source)
      at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown Source)
      at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getObjectByQuery(Unknown Source)
      at gov.nih.nidb.util.OJB.populateScientist(OJB.java:91)
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
just try putting that  P6SPY JDBC driver jar in WEB-INF/lib folder and try again.

If you are using eclipse just add the jar entry to build path (add external jar option).

Thank You.
1) do keep oracle jdbc driver and p6spy jdbc driver in classpath OR in WEB-INF/lib.
2) Make sure the spy.properties file is in classpath.
3) make sure the realdriver property in spy.properties contains the reference to the oracle thin driver.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jwright9Author Commented:
My p6spy driver:


and my Oracle driver:


are in my WEB-INF/lib directory.  I'm using Eclipse but I'm not sure how to add the spy.properties file to the classpath in Eclipse.  The realdriver property:   realdriver=oracle.jdbc.OracleDriver
is present in the spy.properties file.  Both driver jar files are in the .classpath file which I assume is the same as the CLASSPATH.  That is the CLASSPATH is read from the .classpath file.

HOW EVER I AM STILL GETTING THE DRIVER ERROR. (not yelling just want to let you know I still need help!

*grin* Thanks, J.

CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

realdriver should be oracle.jdbc.driver.OracleDriver
jwright9Author Commented:
Thanks fargo.  I fixed the real driver line but I'm still getting the error.  I'm running out of ideas.
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Ok try this out

do a right click on the project and selcet java build path select libraries tab and select and external jars and add all the jars present in the folder in which you found classes12.zip or classes12.jar (jdbc/lib i think) and then try.

And one more thing are you sure that URL which you are using to data base is correct????

is the port number correct Please check this one.

I think the port may be 1521 just check.

And also chek if the entry of the database is there in TNSNAMES file.


Check out may help.

Thank You.

does the exceptions get reduced by adding realdriver. Or the exceptions are still the same as before?
jwright9Author Commented:
Fargo,  The exceptions are about the same.  Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.