Installing JasperReports Server
By installing the JasperReports Server (JRS) engine, you can always view up-to-date information in the WorldServer Report Center.
Before you begin
Make sure you have installed Microsoft SQL Management Studio (MSSQL DB) or Oracle SQL Developer (Oracle DB) on your local machine. You also need a working version of WorldServer 11.x (with Java Development Kit 8 and Tomcat 8) on the same machine. JRS 6.3.0 works with Java Development Kit (JDK) 8 and Tomcat 8, so you can use the same Tomcat and JDK versions you used when you installed other WorldServer 11.x components (ws-api, ws, ws-legacy).
Important: If possible, place WorldServer and JRS on different Java virtual machines. If you already have an instance of Tomcat on your computer, make sure that it is stopped before you start to install JRS.
About this task
The following procedure applies to the configuration of the JasperReports Server engine for WorldServer 11.x. Only users with administrator permissions can install JasperReports Server. You can find the JasperReports Server installation kit on the WorldServer FTP, in <distribution archive>\integrations\JasperSoft_6.3.0.
Important: If you encounter any issues while performing one of the steps, stop the installation process and start over from the very beginning. This also includes deleting the jasperserver database that was created automatically on your local machine.
Procedure
- Go to the JasperReports Server installation kit and extract the jasperreports-server-6.3.0-bin.zip package to a path of your choice, such as C:\Jasper.
Note: Throughout the entire procedure, this path will be referred to as <js-install>. Always remember to replace <js-install> with the actual path.
- The jasperreports-server-6.3.0-bin.zip package contains a folder called Reports, in which you can find Tomcat 8 and JDK 8. Copy that folder to one of the following paths:
- If you installed WorldServer 11.x by using the installer, copy the Reports folder to C:\Program Files\Idiom.
- If you installed WorldServer 11.x by using Tomcat 8, copy the Reports folder to C:\Program Files\Apache Software Foundation.
Note: Throughout the entire procedure, this path will be referred to as <tomcat8-home>. Always remember to replace<tomcat8-home> with the actual path. - Open the command prompt (CMD) as an administrator and enter the following commands in the order in which they are presented:
Command Notes set JAVA_HOME=<tomcat8-home>\Reports\jreMake sure you replace <tomcat8-home> with the actual path (such as C:\Program Files\...). set Path=%JAVA_HOME%\bin;%Path%This is to set the Path variable. java -versionThis is to check that the system is now running on Java 8. cd C:\<js-install>\jasperreports-server-6.3.0-bin\buildomaticMake sure you replace <js-install> with the path where you extracted the jasperreports-server-6.3.0-bin.zip package. js-install-service.bat "<tomcat8-home>\Reports""<user-home>"Make sure you replace <tomcat8-home> with the actual path (such as C:\Program Files\...) and <user-home> with the path of the user's home folder (such as C:\Users\jsmith). Important: Do not close the command prompt until you have finished installing JasperReports Server.You have now installed Tomcat 8 as a service. This service is named SDL WorldServer Reports. - Go to <tomcat8-home>\Reports\tomcat\conf, open the server.xml file, and then make sure that the Tomcat ports in the following entries are different from the ports used by WorldServer:
Connector port="<port>" protocol="org.apache.coyote.http11.Http11Protocol"Server port="<port>" shutdown="SHUTDOWN""Connector port="<port>" protocol="AJP/1.3" redirectPort="<port>" - Go to <tomcat8-home>\Reports\tomcat\bin and check if it contains a file called SDLWorldServerReportsw.exe. If it does not contain a file with this name, rename the tomcat8w.exe file to SDLWorldServerReportsw.exe.
- Go to <js-install>\buildomatic\sample_conf and copy the sqlserver_master.properties or oracle_master.properties file (depending on the type of database you have on your local machine) to <js-install>\buildomatic, and then rename it to default_master.properties.
- Open the default_master.properties file and set the following properties:
Property name Description appServerType This should always be tomcat8.appServerDir This path should be <tomcat8-home>\\Reports\\tomcat (for example, C:\\Program Files\\Idiom\\Reports\\tomcat). dbType If you copied and renamed the correct file in the previous step, do not change the value of this property. dbHost The name of the database server or its IP address. dbUsername The username that will be used to log in to the database. dbPassword The password that will be used to log in to the database. Do not encrypt it. sysUsername Only on Oracle databases. If you want to create and deploy the JasperReports Server database automatically, specify the username of the database administrator. If you want to create and deploy the database manually, specify the same value as for dbUsername. See step 10 for information about creating and deploying databases. sysPassword Only on Oracle databases. If you want to create and deploy the JasperReports Server automatically, specify the password of the database administrator. If you want to create and deploy the database manually, specify the same value as for dbPassword. See step 10 for information about creating and deploying databases. js.dbName Optional: If you want to change the name of the database, uncomment this property and specify a new name. webAppNamePro Optional: If you want to change the folder name (thus, making it part of the URL), uncomment this property and specify a new name. encrypt Set this property to truefor database passwords to be encrypted in configuration files. During the installation, this property creates certain encryption keys in the user's home folder. Pass this folder to js-install-service.bat as a second argument or set the following Java option:-Duser.home=<user-home>Note: - Go to <tomcat8-home>\Reports\tomcat\bin and open the SDLWorldServerReportsw.exe file.
- Click the Java tab, and then, in the Java Options box, add the following properties:
-Djs.license.directory=C:\Jasper\jasperreports-server-6.3.0-bin-Xms512m-Xmx1024m-XX:MaxPermSize=512m-XX:ReservedCodeCacheSize=64m-XX:+UseCodeCacheFlushing-XX:+UseConcMarkSweepGC-Duser.home=<user-home>
Note: Some of these properties may already have been added. In this case, make sure that the correct values are specified. - Create and deploy the JasperReports Server database.
You can do this in two ways.
- Manually, by entering the following commands at the command prompt:
Database type Commands Microsoft SQL Server To create the database:
To deploy the database:cd <js-install>\buildomatic\install_resources\sql\sqlserver sqlcmd -S ServerName -Usa -Psa 1> CREATE DATABASE [jasperserver] 2> GO 1> USE [jasperserver] 2> GO 1> :r js-pro-create.ddl 2> GO 1> :r quartz.ddl 2> GOcd <js-install>/buildomatic js-ant import-minimal-pro js-ant deploy-webapp-proOracle To create the database:
To deploy the database:cd <js-install>/buildomatic/install_resources/sql/oracle sqlplus /nolog (start sqlplus client) SQL> connect system/password (use your sysUsername and password) (or SQL>connect sys/password as sysdba SQL> create user jasperserver identified by password; SQL> grant connect, resource to jasperserver; SQL> connect jasperserver/password@ORCL (use your password, your SID) SQL> @js-pro-create.ddl SQL> @quartz.ddl SQL> exitcd <js-install>/buildomatic js-ant import-minimal-pro js-ant deploy-webapp-pro - Automatically, by entering the following command at the command prompt:
<js-install>\buildomatic\js-install.bat minimal.Note: If you executejs-install.baton Oracle, you need to expose the database administrator's user name and password in the default_master.properties file, as values of the sysUsername and sysPassword properties. If you are using Oracle and you do not want to expose the database administrator's user name and password, create and deploy the database manually.
- Manually, by entering the following commands at the command prompt:
- Go to the JasperReports Server installation kit folder (<distribution archive>\integrations\JasperSoft_6.3.0) and copy the appropriate jrs_repository archive (jrs_repository_ora if you have an Oracle database on your machine or jrs_repository_sql if you have a Microsoft SQL database) to the <js-install> path (for example, C:\Jasper).
Tip: Make sure that the path does not contain white spaces.
- At the command prompt, enter the following command:
<js-install>\buildomatic\js-import.bat --update --input-zip <js-install>\jrs_repository_<sql or ora>.zipIt might take a while to import all the reports. - Open the general.properties file in the WS_CONFIG folder and add the following lines:
wherereport_center_url=http://<jasper-IP>:<port>/jasperserver-pro/flow.html?_flowId=searchFlow&mode=search&filterId=resourceTypeFilter&filterOption=resourceTypeFilter-reports<jasper-IP>is the IP address of the machine where JasperReports Server is installed and<port>is the Tomcat 8 port where JasperReports Server is installed (by default, 8081).
wherews_dashboard_url=http://<jasper-IP>:<port>/jasperserver-pro/flow.html?_flowId=dashboardRuntimeFlow&dashboardResource=/Dashboards/WSDashboard&viewAsDashboardFrame=true<jasper-IP>is the IP address of the machine where JasperReports Server is installed and<port>is the Tomcat 8 port where JasperReports Server is installed (by default, 8081). - Go to <tomcat8-home>\Reports\tomcat\webapps\jasperserver-pro\WEB-INF and open the applicationContext-worldserver.xml file.
- Configure the
wsLoginUrlandwsSoapUrlproperties as follows:
where<property name="wsLoginUrl"> <value>http://<WS-IP>:<port>/ws-legacy/login</value> </property> <property name="wsSoapUrl"> <value>http://<WS-IP>:<port>/ws-legacy/servlet/rpcrouter</value> </property><WS-IP>is the name or IP address of the machine where WorldServer 11.x is installed and<port>is the port number where WorldServer is installed. - Start the SDL WorldServer Reports service.
- Depending on how you installed WorldServer 11.x, do one of the following:
- If you installed WorldServer 11.x by using the installer, restart the Idiom Process Monitor service.
- If you installed WorldServer 11.x by using Tomcat 8, restart the Apache Tomcat 8 service.
- In your browser, log in to ws-legacy (http://<WS-IP>:<ws-port>/ws-legacy/login), and then log in to JasperReports (http://<WS-IP>:<jasper-port>/jasperserver-pro/login.html).
Use the superuser/superuser credentials to log in to JasperReports.Tip: If the page is not displayed, reduce the -Xmx memory from 1024m to 512m. You may have assigned more memory that the VM can sustain. If reducing memory does not work, take a close look at the Jasper logs. You can find the logs at: <tomcat8-home>\Reports\tomcat\webapps\jasperserver-pro\WEB-INF\logs\jasperserver.log.
- In the WorldServer Report Center, click View > Repository, and then, in the Folders tree, go to <root> > Organizations > WorldServer > DataSources.
- Click WorldServerDB, and then click Edit.
- In the Set Data Source Type and Properties page, specify the following information:
Field Value JDBC Driver OtherJDBC Driver (required) - For Microsoft SQL:
tibcosoftware.jdbc.sqlserver.SQLServerDriver - For Oracle:
tibcosoftware.jdbc.OracleDriver
URL (required) - For Microsoft SQL:
jdbc:tibcosoftware:sqlserver://<db-host-name>:<port>;DatabaseName=<ws-database-name> - For Oracle:
jdbc:tibcosoftware:oracle:@<db-host-name>:<port>:<SID>
Make sure you replace
<db-host-name>,<port>, and<ws-database-name>or<SID>with values that match the configuration of your WorldServer database.User Name (required) The user name that will be used to log in to the database. Password The password that will be used to log in to the database. - For Microsoft SQL:
- Click Test Connection, and then click Save.
- Copy (overwrite) the jasperserver.license file from the jasperreports-server-6.3.0-bin.zip package to the following path: <tomcat8-home>\Reports\tomcat\webapps\jasperserver-pro\WEB-INF.
You can obtain the license file, as well as the installer files, from the WorldServer FTP.