Question

I am using iReport for jasper report. My Backend database is in firebird. I am trying to configure iReport with the firebird but couldn't succeed. I have added the firebird jar file in the classpath of iReport GUI. After that i add the firebird in the services of the iReport. Services window shows me the firebird driver. after that when i right-click on the driver and then connect using selected i got a window in which i have to put my credentials.

user Nmae: sysdba
password : masterkey
JDBC URL: jdbc:firebirdsql:localhost/3050:C:\Users\waqas\Desktop\MOBILESTORE.fdb

When i click on ok button. My iReport goes to connecting to database mode and after long time it didn't response. It still connecting to firebird.

Was it helpful?

Solution

I am assuming that you actually have Firebird installed and your Firebird is running as a service. The user account running the Firebird service does not have access to your user profile and therefor is unable to open a database file in C:\Users\waqas\Desktop\MOBILESTORE.fdb. Put the file in a location that is accessible to all users (or specifically to the user linked to the Firebird service), say C:\Databases\.

That said, I would actually expect this scenario to result in an error almost immediately, so it might be a different problem.

EDIT

You indicate in the comments, that you receive a java.lang.ClassNotFoundException: org.firebirdsql.jdbc.FBDriver. This means that you did not add the Jaybird JDBC driver to the classpath of iReport.

You can download the Jaybird (Firebird JDBC) driver from http://www.firebirdsql.org/en/jdbc-driver/

I don't use iReport myself, but according to this tutorial you can add the driver under Tools > Options > iReport, tab Classpath. You need to add jaybird-full-2.2.3.jar, OR jaybird-2.2.3.jar and connector-api-1.5.jar (from the lib folder in the Jaybird zip).

EDIT 2

I have just downloaded iReport and tried it myself. There are basically two ways of making a database connection to Firebird from iReport, both work for me:

Database JDBC connection

The first option is Database JDBC connection, this requires the driver to be on the classpath:

  1. Go to Tools, Options, iReport, Classpath and add jaybird-full-2.2.3.jar
  2. Click on the create datasource icon on the welcome tab
  3. Select Database JDBC connection and click Next
  4. Give the datasource a name
  5. For JDBC driver enter org.firebirdsql.jdbc.FBDriver
  6. For URL enter the JDBC url for your database (eg jdbc:firebirdsql://localhost/D:/data/db/employee.fdb)
  7. Enter username and password

A click on test should show "Connection test successful!". Now you can use the database connection.

NetBeans Database JDBC connection

The other method of connecting is NetBeans Database JDBC connection

  1. Go to Window, Services
  2. Expand the Databases service
  3. Right click on Drivers, New Driver
  4. Under Driver file(s) add jaybird-full-2.2.3.jar
  5. Driver Class and Name are filled in automatically; click OK
  6. Right click the new Firebird (JCA/JDBC driver) entry and select Connect using
  7. Enter username and password, and the JDBC url, click ok
  8. Click the create datasource icon
  9. Select NetBeans Database JDBC connection
  10. Enter a name and select the connection from the dropdown
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top