How do I add a JDBC driver to iReport?

1

Hello,

I was wondering if someone can help me figure out how to add a JDBC driver to iReport.

Here's the steps I've taken:

  1. JasperReports 3.5.1 Pro installed
  2. JDBC driver JAR copied to C:\\JasperReports\\jasperserver-pro-3.5.1\\ireport\\ide8\\modules\\ext, next to MySQL and PostgreSQL jars.
  3. Bring up iReport. Go into Window->Services. Select Drivers, New Driver...
  4. Add/select my JDBC JAR. I've noticed that the Find button doesn't find the Driver class even though I can see it in the JAR and I know it's an instance of java.sql.Driver.
  5. Type in the driver class name in manually.
  6. Try to connect using my format of the Database URL.
  7. Observe that the Dialog is hanging, with the progress indicator just scanning. No activity on our server console. Nothing in our custom JDBC driver log file.

I'd appreciate any pointers or suggestions.

dgoldenberg's picture
Joined: Oct 7 2009 - 10:26am
Last seen: 9 years 6 months ago

3 Answers:

0

hello dgoldenberg

hmmm, i miss the adding the [driver.jar] in the clathpath from ireport,

 

it is java uses, by me is it in following way, i have add my [driver-class.jar] in the classpath which you can find under the environmentvariables from windows(i think you don't need it for I-Report only ), and in the next step i add this [driver-class.jar] in the classpath from i-report which you can find if you want the menu extras/option/Classpath

there you could add the jar with the jar-add-funktion

 

in my excample i use the mysql-connector-java-3.1.12-bin.jar

 

i get the connection to my sql Database without problems on this way

 

:) perhaps it help you

 

greets

Pfennig



Post Edited by pfennnig at 10/08/2009 10:23
pfennnig's picture
Joined: Sep 18 2009 - 5:14am
Last seen: 9 years 7 months ago
0

I have the driver JAR in the options classpath as well as my Windows system environment CLASSPATH, no go.

dgoldenberg's picture
Joined: Oct 7 2009 - 10:26am
Last seen: 9 years 6 months ago
0

hello :)

hmmm, i-Report have an own Classpath, you must set up  the Driver class into this, too

after this doing, you must connect your Database with your own Databasecontact informations

 

in the Attachments you can find two pictures where you could see what i mean

 

you can test your configuration, if the connetion test isn't successfull perhaps your connectioninformations have a faillure or the databaseservice is not running,

i have test it with my Databse driver,, perhaps you have a different driver, in princip is the equal way but you must check out what your Database need for informations,, also it give much different databases for which you need different Driver and all this Database need different Connection informations

perhaps you send what a Database you use

 

:)

greetz

Pfennig

pfennnig's picture
Joined: Sep 18 2009 - 5:14am
Last seen: 9 years 7 months ago
Feedback