I created an web project in myeclipse using JDK 1.6, Tomcat 5.x and DB2 but I am having problem running the server. I created a user library which contain all the required jars and i added that library in the project’s java build path. Now when i run Tomcat server i get the following error in the console
‘SEVERE: Exception opening database connection
java.sql.SQLException: com.ibm.db2.jcc.DB2Driver
at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:691)’
…
Bu if i go to Tomcat 5 properties and add all the DB2 jars in the ‘prepend classpath’ and also add the IBM\SQLLIB\BIN location to the ‘append to the library path’, then it works fine.
By the all the db2 jars are already in user library and added to the project build path.
How can i get it working without having to manually add the jars and location to tomcat 5 configuration option?