yana Posted October 28, 2009 Share Posted October 28, 2009 HiI just downloaded and installed iReport-nb-3.6.0.I am using DB2 and I am aware of these 2 jar files in my DB2 directory. C:\Program Files\IBM\SQLLIB\java\db2jcc.jarC:\Program Files\IBM\SQLLIB\java\db2jcc_license_cu.jarI tried to follow the iReport wizard to start to create db connection.I selected IBM DB2 (COM.ibm.db2.jdbc.app.DB2Driver) from the list of JDBC Driver and set to Jdbc url to my localhost eg. jdbc:db2:localhost:50000/myDBWhen i select test, i get the following error. Can someone help? Do I need to copy my DB2 jar files somewhere 1st?Exception Message: java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2DriverLevel: SEVEREStack Trace:COM.ibm.db2.jdbc.app.DB2Driver com.jaspersoft.ireport.designer.connection.JDBCConnection.loadDriver(JDBCConnection.java:63) com.jaspersoft.ireport.designer.connection.JDBCConnection.getConnection(JDBCConnection.java:126) com.jaspersoft.ireport.designer.connection.JDBCConnection.test(JDBCConnection.java:447) com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog.jButtonTestActionPerformed(ConnectionDialog.java:335) com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog.access$300(ConnectionDialog.java:43) com.jaspersoft.ireport.designer.connection.gui.ConnectionDialog$4.actionPerformed(ConnectionDialog.java:290) javax.swing.AbstractButton.fireActionPerformed(Unknown Source) javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) javax.swing.DefaultButtonModel.setPressed(Unknown Source) javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) java.awt.Component.processMouseEvent(Unknown Source) javax.swing.JComponent.processMouseEvent(Unknown Source) java.awt.Component.processEvent(Unknown Source) java.awt.Container.processEvent(Unknown Source) java.awt.Component.dispatchEventImpl(Unknown Source) java.awt.Container.dispatchEventImpl(Unknown Source) java.awt.Component.dispatchEvent(Unknown Source) java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) java.awt.Container.dispatchEventImpl(Unknown Source) java.awt.Window.dispatchEventImpl(Unknown Source) java.awt.Component.dispatchEvent(Unknown Source) java.awt.EventQueue.dispatchEvent(Unknown Source) java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) java.awt.Dialog$1.run(Unknown Source) java.awt.Dialog$3.run(Unknown Source) java.security.AccessController.doPrivileged(Native Method) java.awt.Dialog.show(Unknown Source) java.awt.Component.show(Unknown Source) java.awt.Component.setVisible(Unknown Source) java.awt.Window.setVisible(Unknown Source) java.awt.Dialog.setVisible(Unknown Source) com.jaspersoft.ireport.designer.welcome.QuickStartPanel.jButton1ActionPerformed(QuickStartPanel.java:295) com.jaspersoft.ireport.designer.welcome.QuickStartPanel.access$200(QuickStartPanel.java:50) com.jaspersoft.ireport.designer.welcome.QuickStartPanel$2.actionPerformed(QuickStartPanel.java:124) javax.swing.AbstractButton.fireActionPerformed(Unknown Source) javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) javax.swing.DefaultButtonModel.setPressed(Unknown Source) javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) java.awt.Component.processMouseEvent(Unknown Source) javax.swing.JComponent.processMouseEvent(Unknown Source) java.awt.Component.processEvent(Unknown Source) java.awt.Container.processEvent(Unknown Source) java.awt.Component.dispatchEventImpl(Unknown Source) java.awt.Container.dispatchEventImpl(Unknown Source) java.awt.Component.dispatchEvent(Unknown Source) java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) java.awt.Container.dispatchEventImpl(Unknown Source) java.awt.Window.dispatchEventImpl(Unknown Source) java.awt.Component.dispatchEvent(Unknown Source) java.awt.EventQueue.dispatchEvent(Unknown Source) java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) java.awt.EventDispatchThread.pumpEvents(Unknown Source) java.awt.EventDispatchThread.pumpEvents(Unknown Source) java.awt.EventDispatchThread.run(Unknown Source) Link to comment Share on other sites More sharing options...
mdahlman Posted October 28, 2009 Share Posted October 28, 2009 Tools -> Options -> iReport -> Classpath -> Add JAR(Don't click "Reloadable")Regards,Matt Link to comment Share on other sites More sharing options...
yana Posted October 29, 2009 Author Share Posted October 29, 2009 Got it!Thanks! :) Link to comment Share on other sites More sharing options...
azwan_bpk Posted March 31, 2011 Share Posted March 31, 2011 Hai,I'm also get the same like yana.Thanks mdahlman for helping me solve this problem.Thanks to yana also for create this topic.. Link to comment Share on other sites More sharing options...
ADR707 Posted February 29, 2012 Share Posted February 29, 2012 HiI have the same issue as yana.I'm using db2jcc.jar. I have also added it to the classpath, but still the same error.I guess I need to use db2java.jar instead of db2jcc.jar; but unable to find that jar.Can any one help me out with this.thanks. Link to comment Share on other sites More sharing options...
cbarlow3 Posted February 29, 2012 Share Posted February 29, 2012 I'm using 3.7.1 Professional, and it's working with just db2jcc.jar. After you've installed iReport and then used Help | LicenseManager | Install License to install the license, here are what I think are the relevant steps from my installation notes (your mileage may vary, depending on how different your environment is):1. Register the IBM DB2 Universal driver through the "Services" window of iReport: Window | Services Select Databases node Select Drivers note, right-click it, and select New Driver Add IBM DB2 Universal Driver and locate the driver file (db2jcc.jar)2. Services: Then, for each database, add a new connection: Windows | Services Select Databases node, right-click it, and select New Connection to bring up the "New Database Connection" dialog. Choose basic setting tab Name: change dropdown from default of "JDBC-ODBC Bridge" to "IBM DB2 Universal Driver" For "Data Input Mode" radio button, select "Direct URL Entry" User Name: (need an operating system username that has read access to the database) Password: enter the password for this user, and optionally check the "Remember password" checkbox JDBC URL: jdbc:db2://yourHostNameOrIPAddressHere:50000/DBName Click OK, and in the next dialog, confirm the Schema (on our system, it always seems to default to the one we use...obviously, if it doesn't for you, then set it to the correct schema), and click OK.3. For each database, add a new datasource (use the "Report Datasources" icon in the main iReport toolbar. It is located to the right of the Undo and Redo arrows and to the left of the datasource dropdown box): In the Connections/Datasources dialog, click the "New" button In the "Datasource" dialog, it asks you to "Select the datasource type". Select the "NetBeans Database JDBC connection" and click "Next" In the "NetBeans Database JDBC connection dialog, enter a "Name" for the data source Be sure to choose the appropriate connection from the cdropdown box, particularly if you created multiple, similar looking connections in the earlier step. Click "Test" to test the connection, and if it is successful, click "Save" Click "Close" to close the Connections/Datasources dialog box.I hope most of those instructions are applicable to your environment as well.Carl Link to comment Share on other sites More sharing options...
ADR707 Posted March 1, 2012 Share Posted March 1, 2012 Thanks,It worked. 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