Installing the WAR File Using js-install Scripts

Follow this procedure to install JasperReports Server using the WAR file distribution. The js-install shell scripts, supported on Windows, Linux, and Mac, do most of the work for you.

Prerequisites for installing the WAR file:

1. Install a supported version of the Java Development kit (JDK). See the TIBCO Jaspersoft Platform Support document on the Documentation section of the Jaspersoft Community website for a list.
2. Create and set the JAVA_HOME system environment variable to point to the Java JDK location.
3. Locate or install one of the following application servers:
     Apache Tomcat 8.5 or 9
     JBoss EAP 7.x or Wildfly 11.x to 14.x (additional steps may be required for JBoss EAP or Wildfly. Please see Additional Steps for Using JBoss EAP or Wildfly )
     Glassfish 4.1 using the default domain (domain1)

If you use a custom domain with GlassFish, see GlassFish Modifications.

4. Locate or install the PostgreSQL, MySQL, Oracle, SQL Server, or DB2 database. If you use DB2, follow the steps in Additional Steps for Using DB2 and js-install Scripts.

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

For an optional pre-install validation test, run js-install.bat/sh test. See js-install Script Test Mode for more information.

To install the WAR file using js-install scripts:

The scripts are intended for the bash shell.

If installing to non-Linux Unix platforms such as HP-UX, IBM AIX, FreeBSD, or Solaris, the bash shell is required for using the js-install scripts.

1. Extract all files from TIB_js-jrs_7.2.0_bin.zip. Choose a destination, such as C:\Jaspersoft on Windows, /home/<user> on Linux, or /Users/<user> on Mac.

The directory, TIB_js-jrs_7.2.0_bin, appears in the file location you choose.

2. Copy the <dbType>_master.properties file for your database from sample_conf and paste it to buildomatic:
     Copy from — <js-install>/buildomatic/sample_conf/
     Paste to — <js-install>/buildomatic

For example, if your database is PostgreSQL, copy postgresql_master.properties to <js-install>/buildomatic.

3. Rename the file you copied to default_master.properties.
4. Edit the default_master.properties file to add the settings for your database and application server. “Sample Values for the default_master.properties File” lists sample property values for each supported database.

Sample Values for the default_master.properties File

Database

Sample Property Values

PostgreSQL

appServerType=tomcat [jboss-eap-7, wildfly, glassfish, skipAppServerCheck]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
dbHost=localhost
dbUsername=postgres
dbPassword=postgres

MySQL

appServerType=tomcat [jboss-eap-7, wildfly, glassfish, skipAppServerCheck]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
dbUsername=root
dbPassword=password
dbHost=localhost

All Oracle versions other than Oracle 12c with CDB/PDB (including 12c non-CDB)

appServerType=tomcat [jboss-eap-7, wildfly, glassfish, skipAppServerCheck]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
dbUsername=jasperserver
dbPassword=password
sysUsername=system
sysPassword=password		
dbHost=hostname
Oracle 12c with CDB/PDB

Use settings for Oracle, except for the following changes:

dbUsername=c##jasperserver		
sid=cdb1

If you are using sample databases:

foodmart.dbUsername=c##foodmart
sugarcrm.dbUsername=c##sugarcrm

DB2

appServerType=tomcat [jboss-eap-7, wildfly, glassfish, skipAppServerCheck]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
dbUsername=db2inst1
dbPassword=password
dbHost=localhost

If you use DB2, follow the steps in Additional Steps for Using DB2 and js-install Scripts

SQL Server

appServerType=tomcat [jboss-eap-7, wildfly, glassfish, skipAppServerCheck]
appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9.0
dbUsername=sa
dbPassword=sa
dbHost=localhost

Note the following:

When the property appServerType is set to skipAppServerCheck, buildomatic skips any application server validation.

Backslashes in paths must be doubled in properties files, for example:
appServerDir=C:\\Apache Software Foundation\\Tomcat 9.0.

The dbUsername must be the same as the Oracle user name. In addition, buildomatic will not work with the “sys as sysdba” syntax.

For Oracle 12c without CDB/PDB, do not use the c##jasperserver dbUsername. Use the standard jasperserver dbUsername instead.

On Linux, if Tomcat is installed using apt-get, yum, or rpm, see Tomcat Installed Using apt-get/yum.

5. Password encryption

The default_master.properties file has a property setting to enable encryption of passwords that reside on the file system. This applies to all files found under the buildomatic folder, as well as the connection pooling file used by Apache Tomcat (context.xml). Currently, password encryption for connection pooling supports only the Tomcat application server.

To enable encryption on the file system, uncomment the encrypt property so it looks like this:

encrypt=true

For more information about the encryption functionality, refer to the JasperReports Server Security Guide.

6. Run the js-install scripts:
a. Start your database server.
b. Stop your application server.
c. Open Command Prompt as Administrator on Windows or open a terminal window on Linux and Mac OSX.
d. Run the js-install script for the version and files you want, as shown in the following table.

Commands

Description

cd <js-install>/buildomatic

js-install.bat (Windows)

./js-install.sh (Linux and Mac OSX)

Installs JasperReports Server, sample data, and sample databases (foodmart and sugarcrm)

js-install.bat minimal (Windows)

./js-install.sh minimal (Linux and Mac OSX)

Installs JasperReports Server, but not the sample data and sample databases

For Oracle 12c, do not install sample databases. You must use js-install.bat/sh minimal with Oracle 12c.

If you encounter errors during the js-install script execution, see Error Running js-install Scripts (js-install.bat/sh).

7. Set Java JVM Options (required), as described in Setting JVM Options for Application Servers.
8. Set up the license (required) as described in Setting Up the JasperReports Server License.

To view the output log, look in: <js-install>/buildomatic/logs/js-install-<date>.log

Configuring Tomcat to Allow Groovy Scripts

When running JasperReports Server, Tomcat requires additional permission configuration for Groovy scripts in both the catalina.policy file and in the protection domain for reports.

In <apache-tomcat>/conf/catalina.policy, you need to grant Groovy scripts permission to read the JasperReports Server classpath:

grant codeBase "file:/groovy/script" {

permission java.io.FilePermission "${catalina.home}${file.separator}webapps${file.separator}jasperserver-pro${file.separator}WEB-INF${file.separator}classes${file.separator}-", "read";

permission java.io.FilePermission "${catalina.home}${file.separator}webapps${file.separator}jasperserver-pro${file.separator}WEB-INF${file.separator}lib${file.separator}*", "read";

permission java.util.PropertyPermission "groovy.use.classvalue", "read";

};

In <js-webapp>/WEB-INF/applicationContext.xml, the same permissions need to be added to reportsProtectionDomainProvider. This change grants access to reports that use the Groovy language, plus reports that need to load additional classes from the JasperReports Server web application.

<bean id="reportsProtectionDomainProvider" class="com.jaspersoft.jasperserver.api.<br />  engine.jasperreports.util.PermissionsListProtectionDomainProvider">
    <property name="permissions">
      <list>
        <bean class="java.io.FilePermission">
          <constructor-arg value="${catalina.home}${file.separator}webapps<br />            ${file.separator}jasperserver-pro${file.separator}<br />            WEB-INF${file.separator}classes${file.separator}-"/>
          <constructor-arg value="read"/>
        </bean>
        <bean class="java.io.FilePermission">
          <constructor-arg value="${catalina.home}${file.separator}webapps<br />            ${file.separator}jasperserver-pro${file.separator}WEB-INF<br />            ${file.separator}lib${file.separator}*"/>
          <constructor-arg value="read"/>
        </bean>
      </list>
    </property>
</bean>

These settings are required to start any supported version of Tomcat.

Version: 
Feedback