Jump to content
Changes to the Jaspersoft community edition download ×
  • This documentation is an older version of JasperReports Server Installation Guide. View the latest documentation.

    Perform the procedures in this section to install and deploy the JasperReports Server WAR file in WebSphere.

    Installing WebSphere and a Database

    Install WebSphere and a database:

    1. (If you are not using WebSphere 7.0, you can skip this step.) Apply WebSphere Fix 7.0.0.11 to WebSphere 7.0 or install WebSphere 7.0.0.11.
    2. Check that the WebSphere installation created a JAVA_HOME system environment variable. The variable needs to be set to the JAVA directory in the WebSphere installation.
    3. Install the PostgreSQL, MySQL, Oracle, SQL Server, or DB2 database.

    note-icon-ns_28x28.png.e31b8e45ceaf6f2352a8b94bcc81c4b4.png

    The target database can be on a remote server. WebSphere should reside on the local machine.

    4. If you are using one of the following commercial databases: Oracle, SQL Server, or DB2, you will need to download a JDBC driver before beginning the installation steps.

    Download locations are the following:

    http://www.oracle.com/technetwork/indexes/downloads (Oracle)
    http://www.microsoft.com/en-us/download/details.aspx?id=11774 (SQL Server)
    http://www-01.ibm.com/software/data/db2/linux-unix-windows/downloads.html (DB2)

    The downloaded JDBC jar should be copied into the following location:

    <js-install>/buildomatic/conf_source/db/<dbType>/jdbc

    For instance, for Oracle the driver would go here:

    <js-install>/buildomatic/conf_source/db/oracle/jdbc

    See Download a JDBC Driver Jar for more information.

     

    Next, prepare the JasperReports Server files.

    Preparing JasperReports Server Files

    To prepare JasperReports Server files:

    1. Unpack jasperreports-server-5.6-bin.zip to a top-level directory.

    Unpacking the ZIP file creates the directory jasperreports-server-5.6-bin.

    2. Manually create and load the JasperReports Server database. Required.
    3. Manually create and load the sample databases. Optional.

    Manually Creating the JasperReports Server Database contains instructions for manually creating the databases.

    4. Manually import the default users and organization. Required.
    a. Copy the <dbType>_master.properties file for your database from sample_conf and paste it to buildomatic:
    cd <js-install>/buildomatic
    Copy from — <js-install>/buildomatic/sample_conf
    Paste to — <js-install>/buildomatic

    For example, copy sample_conf/postgresql_master.properties to buildomatic.

    b. Rename the file you copied to default_master.properties.
    c. Edit the default_master.properties file:
    Set appServerType to skipAppServerCheck.
    Change dbUsername, dbPassword, and dbHost to appropriate settings for your database.
    If you are using a different port from the default for your database, or if you have installed the database on a remote machine, change the dbPort field under Custom Properties to the appropriate settings.

    Each sample_conf/<dbType>_master.properties file contains appropriate sample values.

    d. Start your database server.
    e. Open a Command Prompt as Administrator and run these commands:

    Buildomatic Targets to Execute

    Commands

    Description

    cd <js-install>/buildomatic

    Go to the buildomatic directory

    js-ant create-js-db Create the jasperserver repository database

    js-ant init-js-db-pro

    js-ant import-minimal-pro

    Initializes database, loads core application data

    js-ant create-sugarcrm-db

    js-ant create-foodmart-db (Optional) Creates sample databases

    js-ant load-sugarcrm-db

    js-ant load-foodmart-db (Optional) Loads sample data into the sample databases

    js-ant import-sample-data-pro

    (Optional) Loads the demos that use the sample data

    5. Set up your license file. For information, refer to Setting Up the JasperReports Server License.

    Next, configure Hibernate and Quartz information in the WAR file.

    Configuring CsrfGuard, Hibernate and Quartz Settings

    Before deploying the JasperReports Server WAR file, update the CsrfGuard, Hibernate, Quartz, and settings as described in this procedure.

    Configure CrsfGuard, Hibernate and Quartz settings in the WAR file:

    1. The WAR file is an archive format in a single file. We will start by extracting the Owasp.CsrfGuard.properties file using the command below:
    cd <js-install>"%JAVA_HOME%binjar" xf jasperserver-pro.war WEB-INF/esapi/Owasp.CrsfGuard.properties[/code]                    

    The jar command creates the WEB-INF/esapi folder in the current location and places the extracted file there.

    Open the WEB-INF/esapi/Owasp.CrsfGuard.properties file for editing and make the following change:

    From:

    org.owasp.csrfguard.PRNG=SHA1PRNG

    To (change the first line and add the second line):

    org.owasp.csrfguard.PRNG=IBMSecureRandom

    org.owasp.csrfguard.PRNG.Provider=IBMJCE

     

    2. Copy the already configured files for hibernate.properties and js.quartz.properties to the WEB-INF folder.

    (These files have been pre-configured by buildomatic for your database type in the steps above.)

    From:

    <js-install>/buildomatic/build_conf/default/webapp/WEB-INF/hibernate.properties

    <js-install>/buildomatic/build_conf/default/webapp/WEB-INF/js.quartz.properties

    To:

    <js-install>/WEB-INF

    3. Edit the scheduler URI port value for WebSphere in the js.quartz.properties:

    Edit js.quartz.properties:

    Set :

    report.scheduler.web.deployment.uri=http://localhost:8080/jasperserver-pro

    To:

    report.scheduler.web.deployment.uri=http://localhost:9080/jasperserver-pro

    4. If you want to configure JasperReports Server to automatically schedule and email reports, enter your mail server information in the js.quartz.properties file. Modify all report.scheduler.mail.sender.* properties as necessary for your mail server.
    5. Now that you have modified/updated the individual configuration files, you must replace them into the WAR file archive using the following commands.
    cd <js-install>"%JAVA_HOME%binjar" uf jasperserver-pro.war WEB-INF/hibernate.properties"%JAVA_HOME%binjar" uf jasperserver-pro.war WEB-INF/js.quartz.properties[/code]
    "%JAVA_HOME%binjar" uf jasperserver-pro.war WEB-INF/esapi/Owasp.CsrfGuard.properties[/code]                    
    6. Delete the WEB-INF directory that you created, along with the edited files it contains.

    Next, configure a JDBC Provider in WebSphere.

    Configuring a JDBC Provider in WebSphere

    To configure a JDBC Provider in WebSphere:

    1. Launch the WebSphere Administrative Console and navigate to Resources > JDBC > JDBC Providers.
    2. On the JDBC providers page, click the Guided Activity link at the top of the JDBC Providers page and follow Integrated Solutions Console instructions:
    a. Configure credentials for a secure database.

    Use the J2C authentication aliases panel to create a new authenticated user.

    In Global Security, click New and enter the following user alias, user ID, and password. These are the credentials that WebSphere uses to access the database:

    J2C Authentication Alias Settings

      Alias

    Example User ID

    Example Password

    PostgreSQL

    postgresql_jasperdb

    postgres postgres

    MySQL

    mysql_jasperdb

    root password

    Oracle

    jasperserver_user

    jasperserver

    password

    DB2

    db2admin_user

    db2admin

    password

    SQL Server

    jasperserver_user

    sa sa
    a. Connect to a database panel. From the Scope drop-down, choose Node:<node_name>,Server=<server_name>
    b. Click the New button to create a new JDBC Provider.
    c. If you database is PostgreSQL or MySQL, select User-defined for the database type; otherwise, select DB2, Oracle, or SQL Server.

    Different options appear depending on your database type.

    d. Select or enter these options, depending on your database type:
    Database type Implementation class name or type Name

    User-defined (PostgreSQL)

    org.postgresql.jdbc2.optional.ConnectionPool

    PostgreSQL JDBC Provider

    User-defined (MySQL)

    com.mysql.jdbc.jdbc2.optional.
      MysqlConnectionPoolDataSource

    MySQL JDBC Provider

    DB2

    Connection pool data source

    DB2 Universal JDBC Driver Provider

    Oracle

    Connection pool data source

    Oracle JDBC Driver

    SQL Server

    Connection pool data source

    Microsoft SQL Server JDBC Driver

    3. Click Next and enter the database classpath information for the JDBC provider:

    <js-install>buildomaticconf_sourcedb<your database>jdbc

    For example, enter:

    C:jasperreports-server-5.6-binbuildomaticconf_sourcedbpostgresqljdbcpostgresql-9.2-1002.jdbc4.jar

    Alternatively, you can copy the JAR file to a location in your WebSphere deployment and specify that location for the JDBC driver path.

    note-icon-ns_28x28.png.e3e37d04ec8eed60024ed1d8364d5c11.png

    If JasperReports Server is deployed on the same host as DB2, delete the following file to avoid conflicts: <db2>/SQLLIB/java/db2jcc.jar

    4. Click Next to proceed to the next step.
    5. Review the JDBC provider information you have entered and click Finish.
    6. Configure data sources and custom properties using one of these procedures:
         Defining a JNDI Name and Sample Data Sources for PostgreSQL and MySQL
         Defining a JNDI Name and Sample Data Sources for DB2
         Defining a JNDI Name and Sample Data Sources for Oracle
         Defining a JNDI Name and Sample Data Sources for SQL Server

    Defining a JNDI Name and Sample Data Sources for PostgreSQL and MySQL

    To define the JDBC data source and expose it through JNDI:

    1. Click the name of the JDBC provider that you just created. For example, PostgreSQL JDBC Provider.
    2. Click Data sources under the Additional Properties of the JDBC provider details panel.
    3. To create a new data source, click New and the new data source wizard appears.
    4. Enter the data source name: jasperserver
    5. Enter the JNDI name: jdbc/jasperserver
    6. Click Next, choose Select an existing JDBC provider, then select PostgreSQL JDBC Provider or MySQL JDBC Provider from the drop-down list.
    7. Click Next and accept the default helper class (com.ibm.websphere.rsadapter.GenericDataStoreHelper). Select the check box to use this data source in container managed persistence (CMP).
    8. Click Next and select the Setup security aliases:

    Field Name

    PostgreSQL Value

    MySQL Value

    Component-managed authentication alias

    <node>/postgresql_jasperdb

    <node>/mysql_jasperdb

    Mapping configuration alias

    DefaultPrincipalMapping

    DefaultPrincipalMapping

    Container-managed authentication alias

    <node>/postgresql_jasperdb

    <node>/mysql_jasperdb

    9. Click Next, review the summary information, and click Finish.

    Next, define custom properties.

    To define custom properties:

    1. In the list of JDBC data sources, select the check box for the newly created jasperserver data source, and click Test Connection.

    In the Messages area a success or failure message appears. The failure message gives you information about which custom properties you need to define. For example, in the case of PostgreSQL 9.0 and MySQL, a message indicates that the error is related to a null database name.

    2. Navigate to the jasperserver data sources General Properties page.
    3. In Additional Properties on the right side of the General Properties page of the jasperserver data source, click Custom properties.
    4. Scroll down the list of properties and select databaseName. Set the value to jasperserver.
    5. If you’re using MySQL, create a new property called url. Enter the following value and save the change:

    jdbc:mysql://localhost/jasperserver?useUnicode=true&characterEncoding=UTF-8

    6. Click Save directly to the master configuration.

    Next, if you installed sample databases, sugarcrm and foodmart, create data sources to use them.

    To create optional sugarcrm and foodmart datasources:

    1. If you plan to run the sample reports, use the following values to create the foodmart and sugarcrm JNDI data sources:
    Field Name Value

    Data source name

    foodmart

    sugarcrm

    JNDI name

    jdbc/foodmart

    jdbc/sugarcrm

    2. Click Save directly to the master configuration.

    Next, deploy the WAR file in WebSphere as described in Deploying the JasperReports Server WAR File in WebSphere.

    Defining a JNDI Name and Sample Data Sources for DB2

    To define the JDBC data source and expose it through JNDI:

    1. Click the name of the JDBC provider that you just created. For example, DB2 Universal JDBC Provider.
    2. Click Data sources under the Additional Properties of the JDBC provider details panel.
    3. To create a new data source, click New and the new data source wizard appears.
    4. Enter the data source name: jasperserver
    5. Enter the JNDI name: jdbc/jasperserver
    6. Click Next, choose Select an existing JDBC provider, then select DB2 Universal JDBC Provider from the drop-down list.
    7. Click Next and enter these values:
    Field Name Value

    Driver type

    4

    Database name

    jsprsrvr

    Server name

    localhost

    Port number

    50000

    8. Select Use this data source in CMP and click Next.
    9. In the Setup security aliases page, enter the following value for Component-managed authentication alias:

    <node>/db2admin_user

    10. Click Next, review the summary information, and click Finish.

    Next, define custom properties.

    To define custom properties:

    1. In the list of JDBC data sources, select the check box for the newly created jasperserver data source, and click Test Connection.
    2. In the Messages area a success or failure message appears. The failure message gives you information about which custom properties you need to define.
    3. Edit the following properties and add the ones that don’t exist, then save the changes:
    Property Name Value

    currentSchema

    JSPRSRVR

    fullyMaterializeLobData

    true

    fullyMaterializeInputStreams

    true

    progressiveStreaming

    2

    progresssiveLocators

    2

    4. Go back to the list of JDBC data sources, select the check box for the jasperserver data source, and click Test Connection.

    Next, if you installed sample databases, sugarcrm and foodmart, create data sources to use them.

    To create optional sugarcrm and foodmart datasources:

    1. If you plan to run the sample reports, use the following values to create the foodmart and sugarcrm JNDI data sources:
    Field Name Value

    Data source name

    foodmart

    sugarcrm

    JNDI name

    jdbc/foodmart

    jdbc/sugarcrm

    Component-managed authentication alias

    <node>/db2admin_user

    <node>/db2admin_user

    Field Name Value

    Database name

    foodmart

    sugarcrm

    Driver type

    4

    4

    Server name

    localhost

    localhost

    Port number

    50000

    50000

    Use this data source in CMP

    selected

    selected

    Property Name Value

    currentSchema

    FOODMART

    SUGARCRM

    resultSetHoldability

    1

    1

    The other properties (fullyMaterializeLobData, fullyMaterializeInputStreams, progressiveStreaming, and progresssiveLocators) are not needed for the sample databases.

    2. Click Save directly to the master configuration.

    Next, deploy the WAR file in WebSphere as described in Deploying the JasperReports Server WAR File in WebSphere.

    Defining a JNDI Name and Sample Data Sources for Oracle

    Before defining the data source, change the name of the driver:

    1. On the JDBC Providers page, click the newly created Oracle JDBC Driver to edit it.
    2. Locate the filename ojdbc14.jar and replace it with the filename ojdbc5-11.2.0.jar, then save the changes.

    To define the JDBC data source and expose it through JNDI:

    1. Click the name of the JDBC provider that you just created. For example, Oracle JDBC Driver.
    2. Click Data sources under the Additional Properties of the JDBC provider details panel.
    3. To create a new data source, click New and the new data source wizard appears.
    4. Enter the data source name: jasperserver
    5. Enter the JNDI name: jdbc/jasperserver
    6. Click Next, choose Select an existing JDBC provider, then select Oracle JDBC Driver from the drop-down list.
    7. Click Next and enter the following values:
    Field Name Value

    URL

    jdbc:oracle:thin:@localhost:1521:orcl

    Data store helper class name

    Oracle11g data store helper

    Use this data source in CMP

    selected

    8. Click Next and in Setup security alias, set Component-managed authentication alias to the following value:

    <node>/jasperserver_user

    9. Click Next, review the summary information and click Finish.

    Next, define custom properties.

    To define custom properties:

    1. In the list of JDBC data sources, select the check box for the newly created jasperserver data source, and click Test Connection.

    In the Messages area a success or failure message appears. The failure message gives you information about which custom properties you need to define.

    2. Navigate to the jasperserver data sources General Properties page.
    3. In Additional Properties on the right side of the General Properties page of the jasperserver data source, click Custom properties, and define properties.

    Next, if you installed sample databases, sugarcrm and foodmart, create datasources to use them.

    To create optional sugarcrm and foodmart data sources:

    1. If you plan to run the sample reports, use the following values to create the foodmart and sugarcrm JNDI data sources:
    Field Name Value

    Data source name

    foodmart

    sugarcrm

    JNDI name

    jdbc/foodmart

    jdbc/sugarcrm

    Component-managed authentication alias

    <node>/foodmart_user

    <node>/sugarcrm_user

    2. Click Save directly to the master configuration.

    Next, deploy the WAR file in WebSphere as described in Deploying the JasperReports Server WAR File in WebSphere.

    Defining a JNDI Name and Sample Data Sources for SQL Server

    To define a JDBC provider:

    1. Click the name of the JDBC provider that you just created. For example, Microsoft SQL Server JDBC Driver.
    2. Click Data sources under the Additional Properties of the JDBC provider details panel.
    3. To create a new data source, click New and the new data source wizard appears.
    4. Enter the data source name: jasperserver
    5. Enter the JNDI name: jdbc/jasperserver
    6. Click Next, choose Select an existing JDBC provider, then select Microsoft SQL Server JDBC Driver from the drop-down list.
    7. Click Next and in Setup security alias, set Component-managed authentication alias to the following value:

    <node>/sqlserver_jasperdb

    8. Click Next, review the summary information and click Finish.

    Next, define custom properties.

    To define custom properties:

    1. In the list of JDBC data sources, select the check box for the newly created jasperserver data source, and click Test Connection.

    In the Messages area a success or failure message appears. The failure message gives you information about which custom properties you need to define.

    2. Navigate to the jasperserver data sources General Properties page.
    3. In Additional Properties on the right side of the General Properties page of the jasperserver data source, click Custom properties, and define properties.

    Next, if you installed sample databases, sugarcrm and foodmart, create datasources to use them.

    To create optional sugarcrm and foodmart data sources:

    If you plan to run the sample reports, use the following values to create the foodmart and sugarcrm JNDI data sources:

    1. In the list of JDBC data sources, click the link for the newly created jasperserver data source.
    2. Click Save directly to the master configuration.

    Next, deploy the WAR file in WebSphere.

    Deploying the JasperReports Server WAR File in WebSphere

    To deploy the JasperReports Server WAR file in WebSphere:

    1. In the Administrative Console, navigate to Applications > New Application and select New Enterprise Application.

    JasperReports Server is a modern application, based on Java Servlet version 2.4, so you do not select the older, WebSphere V4‑compliant application type.

    2. Browse to <js-install>/jasperserver-pro.war on the local file system. Keep the default setting (Fast path selected) and click Next.
    3. On the Select installation options page, accept all the default settings, and select Save. Click Next.
    4. On the Map modules to servers page, make sure the JasperReports Server module is mapped to the cell, node, and server that you want. Click Next.
    5. On the Map modules to servers page, select jasperserver. Click Next.
    6. On the Map virtual hosts page, choose the JasperServer UI application module. Click Next.
    7. In the Map context roots for Web modules, enter jasperserver-pro.
    8. Click Next, review the summary information and start the installation process. (The installation process may take a while.)
    9. Click Save directly to the master configuration.

    Next, set JVM Options. Required.

    Setting JVM Options

    To set the Java JVM Options:

    For the JasperReports Server XML/A functionality to work, special Java JVM options need to be set to resolve class conflicts between the WebSphere and JasperReports Server web services implementation. JVM options also provide the optimal resources for running JasperReports Server.

    To configure your Java JVM options:

    1. Select Enterprise Applications > jasperserver-pro_war > Target specific application status > (server name).
    2. Expand Java and Process Management > Process Definition > Java Virtual Machine > Generic JVM arguments.
    3. In the text box named Generic JVM Options, paste in the following JVM options that explicitly specify JasperReports Server classes for AXIS and Xalan, as well as optimize JVM resources:

    Generic JVM Options on Windows

    Options for all databases

    For Oracle

    set JAVA_OPTS=%JAVA_OPTS% -Doracle.jdbc.defaultNChar=true[/code]                    

    Generic JVM Options on Linux

    Options for all databases

    For Oracle

    export JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.defaultNChar=true"[/code]                    

    note-icon-ns_28x28.png.2aa5113b49b26e4fee531a5d6f64f958.png

    Setting the Oracle localization option, defaultNChar, can substantially impact the performance of JDBC queries. If you do not need to support UTF-8 for your Oracle database, you can omit this setting.

    4. Click Save on the console task bar.

    To configure class loading:

    1. Select Enterprise Applications > jasperserver-pro_war > Class loading and update detection.
    2. In the section Class loader order, select Classes loaded with local class loader first (parent last).
    3. (WebSphere 8.x only; if you are using WebSphere 7.x, skip this step.) In the section WAR class loader policy select Single class loader for application.
    4. Save directly to your master configuration.
    5. Restart WebSphere.

    Next, start the jasperserver-pro application in WebSphere.

    Starting and Restarting JasperReports Server

    To start the jasperserver-pro application:

    1. Restart WebSphere.
    2. In the Administrative Console, navigate to: Applications > Application Types > WebSphere Enterprise Application.
    3. Select the check box next to the jasperserver-pro application, then click Start to start JasperReports Server.
    If you make configuration changes to your JasperReports Server instance, restart JasperReports Server.
    4. Log into JasperReports Server.


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...