Warren - 2007-12-01

I am getting the following exception:

java.lang.ClassCastException: com.p6spy.engine.spy.P6SpyDriver
    at com.ecr.db.DbConnectionPool.Init(Unknown Source)

The line of code throwing the exception is:

obj = (SybDriver)Class.forName(driverName).newInstance();

driverName = com.p6spy.engine.spy.P6SpyDriver

The spy.properties file has the driver set like this:


I have Tomcat starting with:

-Dp6.home=C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ecr\WEB-INF\lib

The p6spy.jar and spy.properties are in the directory above.

I followed the instructions on installing in Tomcat. I can not modify any code in the app and the app does not have source code or support. I have decompiled it, but it is a mess, I would not be able to modify it. The code does set-up some kind of connection pool.

It looks like it is a classpath problem. What do I need to do to get this to work?