facebook

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Dr

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #242059 Reply

    jicr74
    Member

    Hi I’m developing a J2EE project which has to do with a DB2 – JDBC connection seemingly the classpath is wreckin’ it all since when launching:

    Class.forName(driverName);

    it throws
    java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver exception

    I ‘ve set up the classpath which the way I assume it could be and no luck
    The IDE I’m using is eclipse-myeclipse
    and I just added db2java.zip to the build path
    1)placed this ZIP in WEB-INF/lib project
    2)added ZIP to classpath with add jars command

    and it really shows as an added zip but I just can’t get through.
    db2java.zip is supposed to be 7.2 driver

    any Idea?

    #242167 Reply

    Riyad Kalla
    Member

    You need to add it to your app server’s path so at runtime the driver can be resolved. I’m assuming you are using Tomcat, but either way, navigate to your connector’s settings and then go to the Paths settings, from there click “Add” next to “Append to classpath” and go add your driver ZIP/JAR file, then restart your app server, everything should work.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Dr

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