Installation


Tomcat Installation

  1. Download the Apache Tomcat from here: http://tomcat.apache.org/
  2. Install Apache Tomcat by following the installation instructions for your operating system. I assume the Tomcat URL is http://[server]:[port], according to a default installation on your local box this will be http://127.0.0.1:8080.
  3. Once the basic Apache Tomcat installation works, stop the Apache Tomcat server.
  4. Install the oracle JDBC driver, so that the Tomcat can use its internal connection pooling with Oracle
    • Copy the files lib\ojdbc6.jar and lib\orai18n.jar into one of the following directories (only if required! If you are also running the APEX Listener on this tomcat instance then you already find the odjbc6.jar in this directory):
      • Tomcat 6.x: [Tomcat directory]\lib
      • Tomcat 5.5.x: [Tomcat directory]\common\lib
  5. Copy the file webapp\JasperReportsIntegration.war into the directory [Tomcat directory]\webapps.
  6. Start the Apache Tomcat server
    • During startup, Tomcat will detect the new application and deploy the file automatically into the directoy [Tomcat directory]\webapps\JasperReportsIntegration.
  7. Configure the JNDI datasources:
    Here we configure all data sources that can be used with all applications using the integration. These have to be registered within Tomcat. These JNDI (Java Naming and Directory Interface) data sources are internally managed by Apache Tomcat and are optimized for performance. Edit the file [Tomcat directory]\conf\Catalina\localhost\JasperReportsIntegration.xml. After the automatic deployment of the WAR file, this configuration file is created automatically.
    • <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC
      "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd" >

      <Context path="/JasperReportsIntegration" debug="5" reloadable="true"
      crossContext="true">

      <Resource name="jdbc/default" auth="Container" type="javax.sql.DataSource"
      driverClassName="oracle.jdbc.OracleDriver"
      maxActive="20" maxIdle="10" maxWait="-1"
      initialSize="4" minIdle="3" validationQuery="select user from dual"
      testWhileIdle="true" testOnBorrow="true" timeBetweenEvictionRunsMillis="300000"
      numTestsPerEvictionRun="100" minEvictableIdleTimeMillis="10000"

      url="jdbc:oracle:thin:@localhost:1521:XE"
      username="apex_test"
      password="apex_test"
      />

      <Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource"
      driverClassName="oracle.jdbc.OracleDriver"
      maxActive="20" maxIdle="10" maxWait="-1"
      initialSize="4" minIdle="3" validationQuery="select user from dual"
      testWhileIdle="true" testOnBorrow="true" timeBetweenEvictionRunsMillis="300000"
      numTestsPerEvictionRun="100" minEvictableIdleTimeMillis="10000"

      url="jdbc:oracle:thin:@localhost:1521:XE"
      username="apex_test"
      password="apex_test"
      />
      </Context>

    • For each data source you can give it a name (<Resource name="...") and set the connection parameters for your target Oracle database and user. The url is a typical JDBC url: jdbc:oracle:thin:@[server]:[port]:[SID].
    • TEST: http://[server]:[port]/JasperReportsIntegration , now you should see the basic start page for the integration
    • TEST: http://[server]:[port]/JasperReportsIntegration/test?_dataSource=default, now you should see the list of all user objects from the Oracle schema defined in the data source default.

When upgrading from a previous version (of the JasperReportsIntegration)

Upgrade the J2EE application using the following steps: 

  1. Make a backup from the following files:
  2. Copy the new file webapp\JasperReportsIntegration.war into the directory [Tomcat directory]\webapps.
  3. Restore the files from step 1 to their original locations.