Hi,
I have a web project currently running on Tomcat 5 and Oracle 9i. I have setup an Oracle connection pool on Tomcat, thus the Oracle driver JAR will be placed in <Tomcat 5.0 Home>/common/lib.
In my projects, I also make use of some Oracle specific classes, like oracle.sql.BLOB which is a Java object, so I also need to import the Oracle driver JAR into my project. This is ok.
But when I deploy the project, the Oracle jar is also copied into my <project home>/WEB-INF/lib. Logically this is fine, but now Tomcat has two copies of the Oracle driver JAR and it is producing problems for me. I was getting ClassCastExceptions even though the class being used is exactly the same. I fixed the problem by manually deleting the Oracle driver JAR from <project home>/WEB-INF/lib and now Tomcat gets the correct version, as well as the application.
The solution would be if I could somehow tell MyEclipse NOT to export the Oracle driver JAR, but it seems that as long as the JAR is in the project, then it will be exported.
Does anyone have any possible solutions? Currently I have to manually delete the Oracle JAR every time I deploy, which isn’t acceptable as we are still in developing/testing.
– Patrick