Jump to content
Changes to the Jaspersoft community edition download ×

help with db2 Data Source


steve.whitson

Recommended Posts

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

  • 3 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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,

Matt

JasperSoft

Link to comment
Share on other sites

  • 5 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...