facebook

Web project missing jars in class path

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #271323 Reply

    pulakchy
    Member

    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?

    #271400

    Riyad Kalla
    Member

    pulakchy,
    You are doing the right thing. The server needs to know about the JDBC driver, so you have two choices:
    1) Copy the JARs to your Tomcat/lib directory
    2) Append them to the app server classpath as you did

    Deploying the JARs with your project isn’t enough (because of how the app server class loaders work).

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Web project missing jars in class path

You must be logged in to post in the forum log in