steve.whitson Posted January 17, 2008 Share Posted January 17, 2008 Hi, I'm trying to setup a db2 datasource but the system doesn't seem to find my DB2Driver class. ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver The db2java.zip file, or jarred db2java.jar in the lib folder doesn't solve the problem. I've tried unpacking and placing the COM folder in a classes folder (under iReports), placing the COM folder in the root of iReports. Nothing seems to allow the class to be found. I've used the MySQL driver, Oracle and others just fine doing this (jar in lib). Any help here would be greatly appriciated! :) -Steve Link to comment Share on other sites More sharing options...
mdahlman Posted February 5, 2008 Share Posted February 5, 2008 Steve, The class you're not finding is "The App driver" for DB2. The IBM DB2 App Driver is a type-2 JDBC driver. This means you must install the DB2 client classes (dlls) on your client. It uses urls like this: jdbc:db2:<dbname>. It's normally delivered in db2java.zip. Placing it in the lib folder should certainly be good enough (as you said it is for other drivers); but this is assuming that you have the client connectivity already configured. One thing you could try is explicitly setting it in iReport's classpath using the menu Options -> Classpath. Alternatively, I think you may have better luck using "The Universal driver". The IBM DB2 Universal Driver is a type-4 JDBC driver, so the .jar file is all you need on the client. It uses urls like this: jdbc:db2://<server hostname or IP address>:<DB2 UDB Instance port number> / <dbalias>It's normally delivered in db2jcc.jar. It uses this class:com.ibm.db2.jcc.DB2Driver Regards,MattJasperSoft Link to comment Share on other sites More sharing options...
tfoster1 Posted March 7, 2013 Share Posted March 7, 2013 Matt, Perfect answer. Five years later and it worked like a charm! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now