Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC + WAR deployment

168285Jul 29 2002 — edited Apr 8 2003
I'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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2003
Added on Jul 29 2002
2 comments
840 views