How to Install the JasperReports Server WAR file using js-install Scripts
The following section details how to install JasperReports® Server using the WAR file V8.0.0 distribution. The steps in this section provide you with more details on js-install shell scripts supported on Windows and Linux operating systems.
NOTE: You can perform the following steps to install JasperReports Server WAR file using js-install Scripts for V 7.1 as well.
- Install Apache Tomcat 9.0.X application servers from the following link:
https://tomcat.apache.org/download-90.cgiNOTE: To install JasperReports Server V7.1, you must have Apache Tomcat 8.
- Create a folder in
C:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat
- Extract the content from the Tomcat zip into the folder you created in the previous step.
For example,C:\apache-tomcat-9.0.69-windows-x64.zip\apache-tomcat-9.0.69\
toC:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat
-
Set the catalina home by using the following command:
Set "CATALINA_HOME=C:\Jaspersoft\jasperreports-server-8.0.0\apache-tomcat"
NOTE: In Linux, these variables will be set in bash profile and executed before going further.
- Set the JRE home by using the following command:
set "JRE_HOME=<C:\Program Files\Java\jdk1.8.0_321\jre\"
NOTE: In Linux, these variables will be set in bash profile and executed before going further.
- Add the
CATALINA_HOME
and theJRE_HOME
to the PATH variable.
- Locate or install the SQL Server database.
NOTE: The target database can be on a remote server.
NOTE: The application server should reside on the local machine.
- Extract all the files from the
jasperreports-server-8.0.0-bin.zip
.- Navigate to the destination, for example,
C:\Jaspersoft
on Windows and/home/<user>
on Linux.
The directory,jasperreports-server-8.0.0-bin
, appears in the file location that you have chosen.
NOTE: The <js-install> refers to <unzipped-location>\jasperreports-server-8.0.0.-bin.
- Navigate to the destination, for example,
- Copy the
<database name>_master.properties
file, specific to your database, from thesample_conf
and paste it to thebuildomatic
folder:- Copy from —
<js-install>/buildomatic/sample_conf/
- Paste at —
<js-install>/buildomatic
For example, if your database is PostgreSQL, copy the
postgresql_master.properties
to the<jsinstall>/buildomatic
.
- Copy from —
- Rename the file you copied to the
default_master.properties
. - Edit the
default_master.properties
file to add settings specific to your database and application server.The following table details for db types and their respective sample property values:
Database Type Sample Property Values PostgreSQL - appServerType=tomcat9 [tomcat7, tomcat8, jboss, jboss-eap-6, jboss-as-7, glassfish3, skipAppServerCheck]
- appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9
- dbHost=localhost
- dbUsername=postgres
- dbPassword=postgres
MySQL - appServerType=tomcat9 [tomcat7, tomcat8, jboss, jboss-eap-6, jboss-as-7, glassfish3, skipAppServerCheck]
- appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9
- dbUsername=root
- dbPassword=password
- dbHost=localhost
Oracle 12c with CDB/PDB Use settings for Oracle, except for the following changes:
- dbUsername=c##jasperserver
- sid=cdb1
Other supported Oracle databases
(including 12c non- CDB)- appServerType=tomcat9 [tomcat7, tomcat8, jboss, jboss-eap-6, jboss-as-7, glassfish3, skipAppServerCheck]
- appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9
- dbUsername=jasperserver
- dbPassword=password
- sysUsername=system
- sysPassword=password
- dbHost=hostname
DB2 - appServerType=tomcat9 [tomcat7, tomcat8, jboss, jboss-eap-6, jboss-as-7, glassfish3, skipAppServerCheck
- appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9
- dbUsername=db2admin
- dbPassword=password
- dbHost=localhost
SQL Server - appServerType=tomcat9 [tomcat7, tomcat8, jboss, jboss-eap-6, jboss-as-7, glassfish3, skipAppServerCheck]
- appServerDir=c:\\Program Files\\Apache Software Foundation\\Tomcat 9
- dbUsername=sa
- dbPassword=sa
- dbHost=localhost
NOTE: When the appServerType property is set to skipAppServerCheck, the buildomatic skips all the application server validations.
The following are the limitations:- You must add an extra \ (backslash) to paths in the .properties files, for example, appServerDir=C:\\Apache Software Foundation\\ apache-tomcat-9.0.69.
- The dbUsername must be the same as the username used in the Oracle DB. 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.
- Update the encrypt property for 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 the files found in the buildomatic folder, as well as the connection pooling file used by Apache Tomcat (context.xml). Currently, password encryption for connection pooling is supported only on the Tomcat application server.To enable encryption on the file system, un-comment the encrypt property so that it looks like this:
encrypt=true
- Run the js-install Script in test mode.
To run the js-install script in test mode on Windows, follow these steps:
- Navigate to the buildomatic directory:
cd <js-install>/buildomatic
- Enter the following command to run the js-install script in test mode:
js-install.bat test
- Navigate to the buildomatic directory:
- To run the js-install script in test mode on Linux, follow these steps:
- Navigate to the buildomatic directory:
cd <js-install>/buildomatic
- Enter the following command to run the js-install script in test mode:
./js-install.sh test
----------------------------------------------------------------------
Running JasperReports Server install script at 2022-12-16_12-31
----------------------------------------------------------------------
[test] Running pre-install-test-pro Ant task
----------------------------------------------------------------------
Buildfile: C:\Users\kh9266\Documents\jasperreports-server-8.0.0-bin\buildomatic\build.xml [echo] Filtering properties (cleaning out blank spaces) - Navigate to the buildomatic directory:
- Set Java JVM Options (required)
The following table details JVM options on Windows (64-bit):
JVM Options on Windows (64-bit) Options for all application servers - set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m -XX:PermSize=32m
- set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=512m -Xss2m -XX:+UseConcMarkSweepGC
- set JAVA_OPTS=%JAVA_OPTS% -XX:+CMSClassUnloadingEnabled
For Oracle - set JAVA_OPTS=%JAVA_OPTS% -DORACLE.JDBC.DEFAULTNCHAR=TRUE
Additional options for JBoss - set JAVA_OPTS=%JAVA_OPTS% -DJAVAX.XML.SOAP.MESSAGEFACTORY=ORG.APACHE.AXIS.SOAP.MESSAGEFACTORYIMPL
- set JAVA_OPTS=%JAVA_OPTS% -DJAVAX.XML.SOAP.SOAPCONNECTIONFACTORY=ORG.APACHE.AXIS.SOAP.SOAPCONNECTIONFACTORYIMPL
- set JAVA_OPTS=%JAVA_OPTS% -DJAVAX.XML.SOAP.SOAPFACTORY=ORG.APACHE.AXIS.SOAP.SOAPFACTORYIMPL
Additional option for JBoss EAP6.0.1 - set JAVA_OPTS=%JAVA_OPTS% -DJAVAX.XML.TRANSFORM.TRANSFORMERFACTORY=ORG.APACHE.XALAN.PROCESSOR.TRANSFORMERFACTORYIMPL
NOTE: Add the JAVA_OPTS in <js-install>/bin/catalina.bat
The following table details JVM options on Linux (64-bit):
JVM Options on Linux (64-bit) Additional options for all application servers - EXPORT JAVA_OPTS="$JAVA_OPTS -XMS1024M -XMX2048M -XX:PERMSIZE=32M"
- EXPORT JAVA_OPTS="$JAVA_OPTS -XX:MAXPERMSIZE=512M -XSS2M"
- EXPORT JAVA_OPTS="$JAVA_OPTS -XX:+USECONCMARKSWEEPGC"
- EXPORT JAVA_OPTS="$JAVA_OPTS -XX:+CMSCLASSUNLOADINGENABLED"
For Oracle - export JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.defaultNChar=true"
Additional options for JBoss - export JAVA_OPTS="$JAVA_OPTS -Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl"
- export JAVA_OPTS="$JAVA_OPTS -Djavax.xml.soap.SOAPConnectionFactory=org.apache.axis.soap.SOAPConnectionFactoryImpl"
- export JAVA_OPTS="$JAVA_OPTS -Djavax.xml.soap.SOAPFactory=org.apache.axis.soap.SOAPFactoryImpl"
Additional options for JBoss EAP 6.0.1 - export JAVA_OPTS="$JAVA_OPTS -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"
- Set up the license (required)
Replace the existing license file with the actual license file present in the following location:
OPERATING SYSTEMS Linux /home/<user>/
Windows installed from WAR file C:\Users\<user>\
Windows installed from binary installer C:\Users\
NOTE: View the output logs at
<js-install>/buildomatic/logs/js-install-<date>.log
- Run the
js-install
scripts:- Start your database server.
- Stop your application server.
- Open the Command Prompt as Administrator on Windows or open a terminal window on Linux.
- Type
cd <js-install>/buildomatic
- Run the js-install script.
Description Commands Install the JasperReports Server, sample data, and sample databases (foodmart and suagrcrm) - >
js-install.bat
(Windows) $ ./js-install.sh
(Linux)
Install the JasperReports Server, but not the sample data and sample databases > js-install.bat minimal
(Windows)$ ./js-install.sh minimal
(Linux)
NOTE: Windows has a path length limitation of 260 characters.
Instead of installing JRS from <LocalDrive_Path>\Projects\JasperReports Server\jasperreports-server-8.0.0-bin, try to install it from C:\jasperreports-server-8.0.0-bin.
-
Download the hotfix_JRSPro8.0.2_cumulative_20221102_0944 from TIBCO Support.
-
Apply the
hotfix_JRSPro8.0.2_cumulative_20221102_0944
hotfix.
Follow the readme.txt file under thehotfix_JRSPro8.0.2_cumulative_20221102_0944
and apply the hotfix. -
Start and Log into JasperReports Server 8.0.0.
-
Start your application server (Tomcat server).
-
Use any of the following commands to start your application server and run the JasperReports Server:
- Tomcat:
- Windows:
<tomcat>\bin\startup.bat
Linux:
<tomcat>/bin/startup.sh
- Windows:
- Tomcat:
-
-
Clear your browsing cache.
-
Log in to the JasperReports Server. You can view the JasperReports Server version upgraded to V8.0.2.
To check the upgraded version of the Jasper Reports Server, click the link specified in the footer immediately after the upgrade. The About TIBCO JasperReports Server dialog appears with upgraded details, shown below:
-
-
Perform the Post-Installation tasks as specified in the Post-Installation Tasks.
-
Clear the application server's Work and Temp folder.
- Go to
<tomcat>/work
folder and delete all the files and folders in that directory. - Go to
<tomcat>/temp
folder and delete all the files and folders in that directory.
- Go to
-
Clear the Repository Cache Database table.
- Run the following commands in the JasperServer's PostgreSQL DB with
postgres
user.update JIRepositoryCache set item_reference = null;
delete from JIRepositoryCache;
- Run the following commands in the JasperServer's PostgreSQL DB with
-
Configure the JasperReports Server. Refer to How to Configure the JasperReports Server.
Now your JasperReports Server is upgraded to V 8.0.2, and all the analytics information from the previous version is available in the upgraded version.