Jump to content
Changes to the Jaspersoft community edition download ×

Having trouble connecting iReport (v 1.2.6) to Db2


hsbgowd

Recommended Posts

I am unable to connect to the db2 database. Getting an error "Please check username and password. The DBMS is running". I am using iReport1.2.6 and I get this error even if I check the 'Save Password' option.

Any help to fix this would be appreciated.

PS: I am having db2java.jar in the classpath. Hope this is the right one.

 

/uploads/projects/ireport/image/db2_connection_error.JPG



Post Edited by hsbgowd at 06/15/2009 12:12



Post Edited by hsbgowd at 06/15/2009 12:15
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

hsbgowd,

 

You are using "the APP driver". The IBM DB2 App Driver is a type-2 JDBC driver. This means you must install the DB2 client classes (dlls) on your client. This is generally more difficult to use than type-4 drivers. It is generally delivered in db2java.zip. Is it intentional on your part?

 

I suggest that you use "the Universal driver". The IBM DB2 Universal Driver is a type-4 JDBC driver. The driver class is "com.ibm.db2.jcc.DB2Driver". The url will be exactly like the url you are using now. It is generally delivered in db2jcc.jar.

 

Regards,
Matt

Link to comment
Share on other sites

Hi Matt,

Thanks a lot. It works now!

I did use the "com.ibm.db2.jcc.DB2Driver" driver after adding db2jcc.jar in the classpath. It was again giving an error that  classpath does not include the licence file "db2jcc_license_*.jar". So i added all remaining jars from the folder containing db2jcc.jar and bingo it works!!

Thanks,

hsbgowd

Link to comment
Share on other sites

  • 2 months later...

Hello Matt,

I am new to JasperReport. I am updating existing report. My report is a very old version of JasperReport since there is only xml file for the source. If I use most current version of iReport to build the report by copying xml to Jrxml, my java code: JRLoader.loadObject() complains " cannot load the jasper file"....

I tried all versions of iReport  from V3.5 to V0.2.0. Finally I found that iReport-0.2.2 seems work for me. But when I added DB2 to the connection, I encounted the same issue as hsbgowd had. I already add db2jcc.jar and db2jcc_license_cu.jar in my classpath. my db2 version is 8.1.7 also very old.

Could you please help me?

Thanks in advance.

Wei

Link to comment
Share on other sites

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...