JDBC + WAR deployment
168285Jul 29 2002 — edited Apr 8 2003I've recently moved to JDeveloper and was quite impressed with the ability to deploy directly to a WAR file. However, I seem to have run into some trouble. When I use classes12.jar JDBC drivers in my project library and build the WAR it includes many of the JDBC classes in the WAR file. So I bring this war over to Tomcat in the usual way and my database connections don't work. I get:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:537)
Somewhat strangely if I go directly into the deployed WAR file and remove the Oracle and Javax directories from my classes folder, and then add classes12.jar to my Tomcat/lib directory then everything works fine.
It seems as though the process of deploying to a WAR file is corrupting or omitting certain important classes.
1) Would anyone have any idea what could cause this sort of behaviour? Is there a problem with JDevelopers WAR deployment?
2) Also failing all else, is there a way of including the classes for compiling but not having them included in the WAR file? I tried putting oracle12.jar into the lib and lib/ext directory but it didn't seem to pick them up.
Thanks in advance,
Dave Molloy