01 Instalar Jasper Report Integration en Glassfish

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Installation requirements

The following requirements have to be met, in order to use the software:

Oracle Database Release: The minimum requirement is the availability of the package UTL_HTTP.
Thus the integration will work with all Oracle versions, in which Oracle APEX can be installed. Thus, the
integration will work with Oracle XE (10g), too.
Oracle APEX Release: There is no dependency on a specific APEX release, it should work with all of
them.
J2EE server: The integration has been tested with Apache Tomcat 5.5.20, 6.0.20 and 7.0.8. Should
work with other J2EE containers, but the configuration of the data sources will be different.
JasperReports: The current J2EE application supports the JasperReports engine 4.6.0. Reports
created with a higher version will not work.But you can upgrade the JasperReports engine separately
later using the instructions in the FAQ.

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:


o [Tomcat directory]\conf\Catalina\localhost\JasperReportsIntegration.xml
o Backup the deployed files from [Tomcat
directory]\webapps\JasperReportsIntegration\reports
o Backup the configuration file [Tomcat
directory]\webapps\JasperReportsIntegration\WEB-
INF\classes\jasperreports.properties if modified.
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.

Installation instructions
The database objects required for the integration will be installed into each application schema that you want to
use with the integration. Currently, there are no scripts supplied to install the integration into a central Oracle
schema. It should work to have a single installation per instance using synonms and grants to all application
schemas that want to use the integration.

The installation instructions will refer to the application schema (in which you install the software)
as [application schema]. The password for the application schema will be referred to as [application
schema password].
Thus when I use an instruction like sqlplus [application schema]/[application schema
password]@[database] please replace that with the actual values of your local installation. For example, if
you want to install the integration kit into the schema HR with the password hr1 into your local XE instance
(having a TNS entry namedxe) then this instruction translates to:
sqlplus hr/hr1@xe
Database installation (SYS)
First of all we need to grant the required privileges to the Oracle user who will own the packages for the
integration.

1. Extract the downloaded zip file.


2. Open a command shell:
o e.g. on Windows: Start > Execute : cmd
3. Go to the subdirectory sql (of where you extracted the file):
o cd sql
4. Connect as SYS to the local instance (using sqlplus)
o sqlplus "sys/[sys password]@[database] as sysdba"
5. Run the installation script (and pass the name of the target application schema as a parameter)
o @sys_install.sql [application schema]
6. [optional] If you are installing on an Oracle Release 11.0 and higher, you have to grant the required
network privileges to the application schema.
o The script sys_install_acl.sql allows access to the local machine on port 80 to port 10000. Please
adapt the script to suit your needs, especially if the J2EE server is running on a different machine.
o @sys_install_acl.sql [application schema]
Database installation (Application Schema)

1. Open a command shell:


o e.g. on Windows: Start > Execute : cmd
2. Go to the subdirectory sql (of where you extracted the file):
o cd sql
3. Connect as the application schema to the local instance (using sqlplus)
o sqlplus [application schema]/[application schema password]@[database]
4. Run the installation script
o @user_install.sql

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 ishttp://[server]:[port], according to a default installation on your local box this will
behttp://127.0.0.1:8080.
o !!! If you are running Oracle XE on the same box, you will likely get a port conflict !!! You have two
options here:
1. Change the port for your Oracle XE installation
2. Change the port for your local Tomcat installation
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
o 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
o 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.

GUIA SIMPLIFICADA
1. Copiar el comprimido de JasperReportsIntegration en la carpeta del dominio del Glassfish
y descomprimirlo ah mismo.
2. Desde consola setear las variables de entorno del sistema:
o (set/export) ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
(ruta de instalacin del Oracle)
o (set/export) PATH=$ORACLE_HOME/bin:$PATH
o (set/export) ORACLE_SID= XE
3. Entrar desde consola al directorio JasperReportIntegration y ah encontrar una carpeta
llamada sql. Entre en ella.
4. Conectarse al sqlplus sqlplus /nolog (enter)
o connect sys/infos as sysdba (enter)
o @sys_install.sql SIG [esquema donde est instalado el Apex] (enter)
o @sys_install_acl.sql SIG (enter)
o Connect sig/infos (enter)
o @user_install.sql (enter)
5. Realizar las siguientes acciones en el Glassfish.

A) Crear Pool De Conexiones (Oracle)

B) Crear Datasource
C) CARGAR EL WAR

You might also like