13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data Sources and Query ExecutersFigure 11-6ClassNotFoundError exceptionWhat you have to do is to add the JDBC driver for Oracle, which is a file named ojdbc14.jar (or classes12.zip or classes11.zipfor older versions) to the classpath (which is where the JVM searches for classes). As <strong>iReport</strong> uses its own class loader, it willbe enough add the ojdbc14.jar file to the <strong>iReport</strong> classpath in the Options window (Tools→Options); the same can be done fordirectories containing classes and other resources.11.3.2 URL Not CorrectIf a wrong URL is specified (for example, due to a typing error), you’ll get an arbitrary exception when you click the Testbutton. The exact cause of the error can be deduced by the stack trace available in the exception dialog box.In this case, if possible, it is better to use the JDBC URL Wizard to build the JDBC URL and try again.11.3.3 Parameters Not Correct for the ConnectionThe less-problematic error scenario is one in which you try to establish a connection to a database with the wrong parameters(invalid username or password, nonexistent of not running database, etc.). In this case, the same database will return a messagethat will be more or less explicit about the failure of the connection.11.3.4 Creating a JDBC Connection via the Services View<strong>iReport</strong> provides a second way to configure JDBC connection coming from the NetBeans platform. From the Services view,select New connection (see Figure 11-7).177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!