Jasperreports Server CP Install Guide
Jasperreports Server CP Install Guide
COMMUNITY PROJECT
INSTALLATION GUIDE
RELEASE 4.7
http://www.jasperforge.org
JasperReports Server Community Project Installation Guide
Copyright © 2012 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft
iReport Designer, JasperReports Library, JasperReports Server, Jaspersoft OLAP, and Jaspersoft ETL are trademarks and/or
registered trademarks of Jaspersoft Corporation in the United States and in jurisdictions throughout the world. All other
company and product names are or may be trade names or trademarks of their respective owners.
This is version 0812-JSO47-28 of the JasperReports Server Community Project Installation Guide.
2
Table of Contents
TABLE OF CONTENTS
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Java Version Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 JasperReports Server Distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.1 Installer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.2 WAR File Binary Distribution Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Support for Internationalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3
JasperReports Server Community Project Installation Guide
4
Table of Contents
5
JasperReports Server Community Project Installation Guide
6
Table of Contents
Appendix A Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.1 Binary Installer Freezes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.1.1 Installer Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
A.1.2 Installer DebugTrace Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
A.2 Error Running Buildomatic Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
A.2.1 Missing Java JDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
A.2.2 Forgot to Copy the File ant-contrib.jar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
A.2.3 Older Apache Ant Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
A.3 Unable to Edit Files on Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
A.4 Bash Shell for Solaris, IBM AIX, HP UX and FreeBSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
A.5 Linux Installer Issue with Unknown Host Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
A.6 Problem Starting JasperReports Server on the Mac . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
A.7 Database-related Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
A.7.1 Installation Error Using PostgreSQL 8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
A.7.2 Database Connectivity Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
A.7.3 Maximum Packet Size in MySQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.4 Database Error after Changing Database Port Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.5 Case Sensitivity for Table and Column Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
A.7.6 PostgreSQL: Job Scheduling Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
A.7.7 Error Running Scheduled Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
A.7.8 Error Running a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
A.8 Application Server-related Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A.8.1 Memory Issues Running Under Tomcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A.8.2 Java Out of Memory Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A.8.3 Configuration File Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A.8.4 Context.xml under Tomcat: Special Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
A.8.5 Tomcat 6 Installed Using apt-get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
A.8.6 GlassFish Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
A.8.7 JBoss Modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
7
JasperReports Server Community Project Installation Guide
8
Introduction
CHAPTER 1 INTRODUCTION
JasperReports Server Community Project builds on JasperReports as a comprehensive family of Business Intelligence (BI)
products, providing robust static and interactive reporting, report server, and data analysis capabilities. These capabilities
utilize common metadata and provide shared services, such as security, a repository, and scheduling. The server exposes
comprehensive public interfaces enabling seamless integration with other applications and the capability to easily add custom
functionality.
JasperReports Server provides the ability to:
Efficiently and securely manage many reports.
Interact with reports, including sorting, changing formatting, entering parameters, and drilling on data.
Schedule reports for distribution through email and storage in the repository.
For business intelligence users, Jaspersoft offers Jaspersoft OLAP, which runs on the server.
Jaspersoft provides several other sources of information to help extend your knowledge of JasperReports Server:
Our Ultimate Guides document advanced features and configuration. They also include best practice recommendations
and numerous examples. The guides are available as downloadable PDFs. Community project users can purchase
individual guides or bundled documentation packs from the Jaspersoft online store. Commercial customers can download
them freely from the support portal.
Our free Business Intelligence Tutorials let you learn at your own pace, and cover topics for developers, system
administrators, business users, and data integration users. The tutorials are available online from the Professional Services
section of our website.
Free samples installed with JasperReports, iReport, and JasperReports Server, are documented online: JasperReports
Samples Overview and JasperReports Samples Reference. For more information, visit our community website.
This chapter contains the following sections:
Conventions
Java Version Supported
JasperReports Server Distributions
Release Notes
System Requirements
Support for Internationalization
9
JasperReports Server Community Project Installation Guide
1.1 Conventions
This document uses the following conventions when referring to file locations:
Convention Description
<js-install> The root directory where JasperReports Server will be installed.
For manual installations, the directory where you unpack the WAR file distribution.
<postgresql> The directory where PostgreSQL is installed. If you use the instance of PostgreSQL
that is bundled by the installer, <postgresql> is located in the <js-install> directory.
<tomcat> The directory where Apache Tomcat is installed. If you use the instance of Tomcat
that is bundled by the installer, <tomcat> is located in <js-install>.
WAR File Distribution Zip Used for manual installation on Windows, Linux, Mac, and other platforms.
The installer distribution package installs JasperReports Server, automatically configures the JasperReports Server database,
and, if you choose the Install Sample Data option, installs sample data for working with tutorials.
The WAR file binary distribution contains the JasperReports Server web archive file as well as scripts to create and load the
database. The WAR file distribution supports additional applications that are not supported by the installers.
Windows XP
Windows 7
10
Introduction
Note: x86 is shorthand referring to the 386, 486, and 586 CPU architecture.
Note: You can install the 32-bit installer onto a 64-bit operating system, but we recommend that you install the 64-bit installer
onto a 64-bit system. The 64-bit installer will not execute on a 32-bit system.
Component Description
JasperReports Server WAR file and configuration support scripts.
Application
Apache Tomcat Web application container. You can use the bundled version or an existing version.
iReport Designer JasperReports Designer that communicates directly with JasperReports Server for
editing, uploading, or executing reports on the server (optionally installed).
PostgreSQL Database Database server. You can use the bundled version or an existing version.
If you use an existing PostgreSQL, it can be on a local or remote machine. If it’s on a remote Linux machine, configure
PostgreSQL to allow remote connections as described in 2.6.4, “Enabling Connections to a Remote Host,” on page 18.
For information about specific versions of third party applications supported by the installer, refer to the JasperReports Server
release notes in the root of the installation directory.
11
JasperReports Server Community Project Installation Guide
For a complete list of applications supported by the WAR file distribution, refer to the release notes that are included
in the root directory of the distribution.
The target database can be on a remote server. Using a remote PostgreSQL database on some Linux platforms requires a
change to its configuration file, as described in section 2.6.4, “Enabling Connections to a Remote Host,” on page 18.
The application server should reside on the local machine.
There are js-install shell scripts (for Linux and Window) included in the WAR file distribution which automate much of the
installation tasks by using a single properties file. These scripts are named:
js-install-ce.bat
js-install-ce.sh
The main contents of the WAR file binary distribution are:
JasperReports Server Extra Web Service example applications, sample reports, custom data source
Samples examples, and other sample files.
JasperReports Server Standard Sample data that highlights JasperReports Server features.
Sample Data
JasperReports Server WAR file All of the JasperReports Server class files and dependent jars.
archive
12
Introduction
The bundled Apache Ant is version 1.8.1. This version or higher is required if you want to run your own version of Ant.
The bundled Apache Ant has an additional jar that extends Ant functionality. This jar is: ant-contrib.jar. This jar enables
conditional logic in Ant. If you are running your own Ant you should copy the ant-contrib.jar to your Ant/lib folder.
On Linux and Solaris, the js-ant commands may not be compatible with all shells. If you have errors, use the bash
shell explicitly. For more information, see section A.4, “Bash Shell for Solaris, IBM AIX, HP UX and FreeBSD,” on
page 93.
Processor 1.5GHz single Pentium, UltraSparc II, or equivalent 2.5GHz + multi-core Pentium
for Windows, Mac, and Linux
13
JasperReports Server Community Project Installation Guide
14
Installing JasperReports Server
If you want to use an existing database instance, the database must be running at install time. If you want to use an
existing Apache Tomcat, the Tomcat instance should be stopped.
If you choose to install the bundled Tomcat and database, both are installed on the same host with the server.
15
JasperReports Server Community Project Installation Guide
In Mac OSX, the installer is a .zip file. Typically, after download, the installer will be found in your <user>/Downloads folder,
and it will already be unpacked. After the download is complete, double-click the following:
jasperreports-server-cp-4.7.0-osx-x86-installer.app (32 bit)
jasperreports-server-cp-4.7.0-osx-x64-installer.app (64 bit)
Whether you run the installer from the command line or in a graphical environment, you are prompted for the same
information. The following sections describe these prompts, and assume you are in a graphical environment. If you are
installing from the command line, use your keyboard to specify the same details. For example, with the license text, instead of
clicking I accept the agreement, you press Y and press Enter.
The welcome screen introduces the installer and allows you to continue or exit. Click Next.
Note: If you are installing a 32-bit installer onto a 64-bit operating system you will normally get a popup message reminding
you that a 64-bit installer is available. You may continue the 32-bit installation if you choose to.
If you do not accept the agreement, you must exit the installer.
16
Installing JasperReports Server
After selecting a PostgreSQL configuration, you are prompted for Tomcat's server port and shutdown port. Accept the
default values, 8080 and 8005 by default, or enter alternate values.
Port The port number that PostgreSQL uses (default is 5432). User must choose
an alternate port if 5432 is in use.
IP or Host Name The IP address or name of the machine where PostgreSQL is installed. The
default value is 127.0.0.1.
PostgreSQL Administrative Password Password of the database administrative user: postgres. The installer
cannot handle special characters at the end of a password string.
Incompatible characters include: & ; $
Database User Name Hard coded default: jasperdb - The installer creates this user which is used
to connect to the JasperReports Server database
Database User Password Hard coded default: password - The installer uses this password for the
jasperdb user.
If the installer displays an error message saying FATAL: password authentication failed for user postgres, try
re-entering the administrative password for your PostgreSQL database.
17
JasperReports Server Community Project Installation Guide
The following table summarizes the parameters set during the installation of an existing PostgreSQL:
jasperserver Database User Name jasperdb - The installer creates this database user which is used to connect
to jasperserver database.
jasperserver Database User Password password - The installer creates this password for the jasperdb database
user.
To improve system security, Jaspersoft recommends that you change the default password for jasperdb as soon
as possible. To change the jasperdb connection password in JasperReports Server, edit: <js-install>/
apache-tomcat/jasperserver/META-INF/context.xml. (And delete, if it exists: <js-install>/apache-tomcat/conf/
Catalina/localhost/jasperserver.xml.) Then, make the same change in PostgreSQL using pgAdmin III.
To verify that you can connect to the target remote PostgreSQL from the local installation machine:
1. If necessary, install PostgreSQL client tools on your local, JasperReports Server machine.
2. Using your local PostgreSQL client tools, enter this command:
psql -U postgres -h <remote-host> -d postgres
or
<path-to-postgresql-bin-folder>/psql -U postgres -h <remote-host> -d postgres
You might also need to enable connections as described in the next section.
To enable connections from the installation machine to the remote PostgreSQL server:
1. Locate the following PostgreSQL host-based authentication (hba) configuration file on the remote PostgreSQL server
instance:
Windows: C:\Program Files\PostgreSQL\9.0\data\pg_hba.conf
Linux: /var/lib/pgsql/data/pg_hba.conf
2. Add the IP address of your local JasperReports Server installation machine to this file. For example, to allow the local
installation machine with address 192.168.12.10 to connect to the PostgreSQL server, add this entry to the pg_hba.conf
file:
host all all 192.168.12.10/32 trust
18
Installing JasperReports Server
3. Allow TCP/IP connections to the remote PostgreSQL server instance by making the following change to the
postgresql.conf file on the remote machine:
From: listen_addresses = 'localhost'
To: listen_addresses = '*'
4. Restart PostgreSQL.
5. Using your local PostgreSQL client tools, verify that you can connect to the target remote PostgreSQL from the local
installation machine, as described in section 2.6.3, “Using an Existing PostgreSQL on a Remote Host,” on page 18.
The Launch JasperReports Server Now check box option will only be displayed if you have chosen to install a
bundled Tomcat and a bundled PostgreSQL. The menu based start/stop scripts only control the bundled
applications that you chose to be installed. For more information, see Chapter 3, “Starting and Stopping
JasperReports Server,” on page 23.
19
JasperReports Server Community Project Installation Guide
Opt-in for JasperServer Heartbeat - When the heartbeat is enabled, the server sends anonymous system and version
information to Jaspersoft using https. JasperReports Server heartbeat information helps Jaspersoft create better products
by improving our understanding of customer installation environments. For more information, see section 5.4.1,
“JasperReports Server Heartbeat,” on page 34.
Make your choices, then click Finish.
You should now be ready to log into the server.
Database user jasperdb created The JasperReports Server application uses this user to connect to the
database.
Sample database foodmart created (optional) Database created if install sample data option was chosen.
Sample database sugarcrm created (optional) Database created if install sample data option was chosen.
20
Installing JasperReports Server
21
JasperReports Server Community Project Installation Guide
22
Starting and Stopping JasperReports Server
23
JasperReports Server Community Project Installation Guide
JasperReports Server needs to have database and application servers started in this order:
First, start the database server.
Next, start the application server.
cd <js-install>
./ctlscript.sh start|stop postgresql
./ctlscript.sh start|stop tomcat
24
Starting and Stopping JasperReports Server
To start and stop JasperReports Server using the Mac terminal shell:
1. Open a Terminal shell (Finder > Go > Utilities > Terminal Icon).
2. Navigate to the <js-install> folder. For instance: /Applications/jasperreports-server-cp-<ver>
3. To start PostgreSQL, Tomcat, and JasperReports Server, enter:
./ctlscript.sh start
4. To shutdown PostgreSQL, Tomcat, and JasperReports Server, enter:
./ctlscript.sh stop
5. To start and stop individual components:
cd <js-install>
./ctlscript.sh start|stop postgresql
./ctlscript.sh start|stop tomcat
25
JasperReports Server Community Project Installation Guide
8080 is the default port number for the Apache Tomcat application server. If you used a different port when installing
your application server, specify its port number instead of 8080.
The login page appears.
4. Log in using the following credentials:
If you installed the sample data, the sample end-user is also created. This user is a non-administrative user who have fewer
system privileges than an administrative user.
When you complete the evaluation or testing of your JasperReports Server instance, change the
administrator password (jasperadmin) and remove any sample end-users. Leaving the default passwords
and end-users in place weakens the security of your installation.
Windows:
Click Start > All Programs > JasperReports Server CP 4.7.0 > Start iReport Designer.
Linux:
Enter the following commands in a terminal window:
cd <js-install>
ireport/bin/iReportLoader.sh
Mac OSX:
1. From Finder, double-click the iReport-mac.dmg file in the root of the JasperReports Server installation. A new window
appears.
2. Double-click the iReport Designer application.
26
Starting and Stopping JasperReports Server
Tomcat: <tomcat>/webapps/jasperserver/WEB-INF/logs/jasperserver.log
JBoss: <jboss>/server/default/deploy/jasperserver.war/WEB-INF/logs/jasperserver.log
GlassFish: <glassfish>/domains/domain1/autodeploy/jasperserver.war/WEB-INF/logs/jasperserver.log
You can configure the log outputs and logging levels in the log4j.properties file in the WEB-INF folder.
To change the logging levels while you are running JasperReports Server:
1. Browse to http://<hostname>:8080/jasperserver/log_settings.html.
The Log Settings page appears.
2. Change logging levels using the drop-down menus.
Changes to logging levels affect only the current session of JasperReports Server. Logging levels revert to default settings
as defined in the properties files at the next startup.
For more information about system logging, see the JasperReports Server Administrator Guide.
27
JasperReports Server Community Project Installation Guide
28
Uninstalling JasperReports Server
4.1 Windows
To uninstall JasperReports Server on Windows 7:
Click Start > All Programs > JasperReports Server CP 4.7.0 > Uninstall JasperReports Server.
The uninstaller will not execute if Protect my computer and data from unauthorized program activity is
checked.
4.2 Linux
Under Linux, the <js-install> folder includes an executable that removes JasperReports Server from the host.
29
JasperReports Server Community Project Installation Guide
3. Respond Y or yes to the prompt that asks if you want to remove JasperReports Server from this computer.
30
Installing the WAR File Distribution
In addition to the installer binaries, you can install the JasperReports Server application using the stand-alone WAR file
distribution. If you do not want to use the installer or your target configurations, such as your database or application server,
are unsupported by the installer, use the WAR file distribution. Download the WAR file distribution from Jaspersoft technical
support (http://support.jaspersoft.com) or contact your sales representative. The WAR file distribution comes in a file named
jasperreports-server-4.7.0-bin.zip in the compressed ZIP format.
This chapter contains the following sections:
Applications Supported by the WAR File Distribution
Installing the WAR File Using js-install Scripts
Starting JasperReports Server
Starting JasperReports Server
Logging into JasperReports Server
Installing the WAR File Manually
Troubleshooting Your JasperReports Server Configuration
Running the Import and Export Utilities
For version information about these databases and application servers refer to the release notes in the root of the unpacked
distribution ZIP.
31
JasperReports Server Community Project Installation Guide
The target database can be on a remote server. The application server should reside on the local machine.
If you would like to run a pre-install validation test, you can run js-install-ce.bat test or a similar command. For more
information about how to perform a validation test in your environment, see section 5.6.3.1, “js-install Script Test Mode,” on
page 37.
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.
32
Installing the WAR File Distribution
2. Copy the <database>_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, 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. Table 5-1 lists sample
property values for each supported database.
Table 5-1 Sample Values for the default_master.properties File
* 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 7.
Commands Description
cd <js-install>/buildomatic
33
JasperReports Server Community Project Installation Guide
If you encounter errors during the js-install script execution, see section 5.6.3, “Error Running js-install Scripts (js-
install-ce.bat/sh),” on page 36.
6. Set Java JVM Options, as described in 6.2, “Setting JVM Options for Application Servers,” on page 43. This step is
required.
When you complete the evaluation or testing of your JasperReports Server instance, change the
administrator password (jasperadmin) and remove any sample end-users. Leaving the default passwords
and end-users in place weakens the security of your installation.
Refer to the JasperReports Server User Guide to begin adding reports and other objects to the server.
34
Installing the WAR File Distribution
The heartbeat helps Jaspersoft understand customer installation environments to improve our products. If you choose to enable
the heartbeat, an HTTPS call at server startup time sends information like this to Jaspersoft:
Operating System type and version
JVM type and version
Application Server type and version
Database type and version
JasperReports Server type and version
Unique, anonymous identifier value
You can manually enable or disable the heartbeat by modifying the following bean in jasperserver/WEB-INF/
applicationContext-logging.xml file:
bean id = “heartBean”
To disable the heartbeat, set the enabled property of the heartbean to false:
<property name="enabled" value="false"/>
For additional information about enabling and disabling the heartbeat component, see the JasperReports Server Administrator
Guide.
To install the WAR file distribution using the manual buildomatic steps:
1. Start your database server.
2. Stop your application server.
3. Create and edit a default_master.properties file to add the settings in for your database and application server as
described in 5.2, “Installing the WAR File Using js-install Scripts,” on page 32.
4. Open a Command Prompt as Administrator on Windows or open a terminal window on Linux and Mac OSX, and run
these commands:
Table 5-2 Buildomatic Targets to Execute to Install the WAR File
Commands Description
cd <js-install>/buildomatic Makes the buildomatic directory your current directory.
js-ant load-sugarcrm-db (Optional) Loads sample data into the sample databases.
js-ant load-foodmart-db
js-ant update-foodmart-db
35
JasperReports Server Community Project Installation Guide
Commands Description
js-ant import-sample-data-ce (Optional) Loads the demos that use the sample data.
js-ant deploy-webapp-ce Configures and deploys the WAR file to Tomcat, JBoss, or
Glassfish.
On non-Linux Unix platforms, the js-ant commands may not be compatible with all shells. If you have errors, use
the bash shell explicitly. For more information, see section A.4, “Bash Shell for Solaris, IBM AIX, HP UX and
FreeBSD,” on page 93.
If you encounter an error when running create-sugarcrm-db, create-foodmart-db, or create-js-db, you can
create the JasperReports Server database manually using the database administration tool for your particular database
type. To create the JasperReports Server database manually for PostgreSQL or MySQL, see section 6.1, “Manually
Creating the JasperReports Server Database,” on page 41.
If you have previously installed the databases, you can drop the old versions and then recreate the databases. To do this,
run the following drop commands before running the commands in Table 5-2:
Table 5-3 Buildomatic Targets to Execute to Delete Sample Databases
Commands Description
js-ant drop-js-db (Optional) Deletes the JasperReports Server repository
database.
5. Set Java JVM Options, as described in section 6.2, “Setting JVM Options for Application Servers,” on page 43. This
step is required.
36
Installing the WAR File Distribution
37
JasperReports Server Community Project Installation Guide
The export file format is a ZIP file or a set of files under a new directory name. If you specify the .zip extension for your output
filename, a ZIP archive is created automatically. Otherwise, a directory with files and sub-directories is created as a
uncompressed set of files.
The exportArgs argument requires double quotation marks (") and can contain more than one export option, as shown in
these Windows examples:
js-ant export-help-ce
On Linux, all double quotation marks (") and other characters, such as the vertical bar (|) must be escaped with a backslash
(\). In addition, when listing user names, enclose the list in single quotation marks ('), as shown in this Linux example:
./js-ant export-help-ce
./js-ant export-ce -DexportFile=my-reports-and-users.zip
-DexportArgs=\"--uris /reports
--users 'jasperadmin,joeuser'\"
38
Installing the WAR File Distribution
The imported file is handled as a ZIP archive if its name ends in .zip, otherwise it is handled as a directory. The importArgs
argument is optional and can contain more than one import option. On Linux, all double quotation marks (") must be escaped
with a backslash (\).
The following examples are typical import commands on Windows:
js-ant import-help-ce
./js-ant import-help-ce
The JDBC drivers are not in place for the MySQL database. You need to obtain and add it to the installation as
described in 5.2, “Installing the WAR File Using js-install Scripts,” on page 32.
If you installed JasperReports Server using the binary installer, the scripts are already properly configured.
These import-export shell scripts are available for Windows and Linux/Mac OSX:
Windows:
<js-install>/buildomatic/js-export.bat
<js-install>/buildomatic/js-import.bat
Linux and Mac OSX:
<js-install>/buildomatic/js-export.sh
<js-install>/buildomatic/js-import.sh
These scripts used to be in the <js-install>/scripts directory.
Run the import-export shell scripts with the help option to list the other options that you can use. For example:
js-export.bat --help
js-import.sh --help
39
JasperReports Server Community Project Installation Guide
40
Manual Database Creation and Other Information
41
JasperReports Server Community Project Installation Guide
cd <js-install>/buildomatic/install_resources/sql/postgresql
psql -U postgres -W
postgres=#create database jasperserver encoding=’utf8’;
postgres=#\c jasperserver;
postgres=#\i js-create.ddl
postgres=#\i quartz.ddl
postgres=#\q
2. (Optional) Run the following commands if you want to install sample databases:
cd <js-install>/buildomatic/install_resources/sql/postgresql
psql -U postgres -W
postgres=#create database sugarcrm encoding=’utf8’;
postgres=#create database foodmart encoding=’utf8’;
postgres=#\c sugarcrm;
postgres=#\i sugarcrm.sql; (first make sure the file is unzipped)
postgres=#\c foodmart;
postgres=#\i foodmart-postqresql.sql; (first make sure the file is unzipped)
postgres=#\i supermart-update.sql;
postgres=#\q
3. Continue from step 2 in section 6.1, "Manually Creating the JasperReports Server Database," on page 41.
6.1.2 MySQL
If you are going to access MySQL on a remote server you should run a command similar to the following
grant statement:
mysql>grant all on *.* to jasperdb@'%';
1. On the Windows, Linux, or Mac OSX command line, enter these commands to create and initialize the JasperReports
Server database:
cd <js-install>/buildomatic/install_resources/sql/mysql
mysql -u root -p
mysql>create database jasperserver character set utf8;
mysql>grant all on *.* to jasperdb@’%’ identified by 'password';
mysql>flush privileges; (reload privilege tables)
mysql>use jasperserver;
mysql>source js-create.ddl
mysql>source quartz.ddl
mysql>exit
42
Manual Database Creation and Other Information
cd <js-install>/buildomatic/install_resources/sql/mysql
mysql -u root -p
mysql>create database sugarcrm;
mysql>create database foodmart;
mysql>use sugarcrm;
mysql>source sugarcrm.sql;(first make sure the file is unzipped)
mysql>use foodmart;
mysql>source foodmart-mysql.sql; (first make sure the file is unzipped)
mysql>source supermart-update.sql;
mysql>exit
3. Continue from step 2 in section 6.1, "Manually Creating the JasperReports Server Database," on page 41.
These example settings are for 64-bit systems. For 32-bit systems, see “Checking your Java JVM
Options” on page 21.
Additional -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
option for
JBoss 5.1
43
JasperReports Server Community Project Installation Guide
JasperReports Server doesn’t provide a virtual X frame buffer on Linux. If your Linux applications are graphical, set the
-Djava.awt.headless=true to prevent Java from trying to connect to an X-Server for image processing.
Additional -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
option for
JBoss 5.1
There are a number of ways to set JVM options. Sections 6.2.2 - 6.2.5 present step-by-step instructions for performing this
task. Alternatively, you can add your JAVA_OPTS settings to any one of these files:
4. Update this line to increase the maximum heap size from 1536M to 2048M, for example:
-Xmx2048M
44
Manual Database Creation and Other Information
5. Because Tomcat is installed as a service, you need to re-install the service. From a Windows Command Prompt, enter
these commands:
cd <js-install>\apache-tomcat\scripts
serviceinstall.bat REMOVE
serviceinstall.bat INSTALL
After running these commands in Windows XP, for example, the cmd shell closes after the commands are executed. The
Tomcat service is removed and then installed. After execution of the commands, the service is running.
6. Stop and restart PostgreSQL and Tomcat after completing this work as described in Chapter 3, “Starting and Stopping
JasperReports Server,” on page 23.
These example settings are for 64-bit systems. For 32-bit systems, see “Checking your Java JVM
Options” on page 21.
-Xms1024m
-Xmx2048m
-XX:PermSize=32m
-XX:MaxPermSize=512m
-Xss2m
45
JasperReports Server Community Project Installation Guide
start_tomcat() {
is_tomcat_running
...
export JAVA_OPTS="-Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m -
Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
...
}
There may be more than one occurrence of the JAVA_OPTS variable in the ctl.sh file. Make sure to edit the instance
inside the start_tomcat() function.
[exec] CLI167 Could not create the following jvm options. Options exist:
[exec] -Xmx512m
[exec] CLI137 Command create-jvm-options failed.
This message indicates that one of the options specified was already set in the JVM. The command will succeed for all other
JVM options on the command line. No further action is necessary.
46
Manual Database Creation and Other Information
3. If you are modifying the settings for a running instance of GlassFish, restart the application server using the following
commands:
asadmin stop-domain domain1
asadmin start-domain domain1
These commands exist as a convenience. Whenever default_master.properties is edited, the resulting configuration
templates are regenerated automatically based on the updated time-stamp associated with the edited file.
47
JasperReports Server Community Project Installation Guide
48
Manual Database Creation and Other Information
You can run these scripts manually by copying them to a location where your database client software is located.
49
JasperReports Server Community Project Installation Guide
The scripts and property files used to create the jasperserver database are here:
<js-install>/buildomatic/conf_source/db/
postgresql/scripts.properties
mysql/scripts.properties
PostgreSQL metadata.hibernate.dialect=com.jaspersoft.hibernate.dialect.PostgresqlNoBlobDialect
MySQL 5.1 metadata.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
MySQL 5.5 metadata.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
6.3.10.1 Tomcat
After setting up the buildomatic configuration for your database, the Tomcat context.xml will be automatically created with
the appropriate settings for JasperReports Server.
When the buildomatic target deploy-webapp-ce is run, the context.xml will be automatically copied into the jasperserver
WAR set of files.
You can view the automatically generated context.xml at the following location:
<js-install>/buildomatic/build_conf/default/webapp/META-INF/context.xml
The final location of the context.xml is:
<tomcat>/webapps/jasperserver/META-INF/context.xml
Tomcat will often create a copy of the context.xml file with a changed name that will be read instead of the one found in the
jasperserver war file. This is often a source of confusion for Tomcat users who attempt change their database settings. If you
change your settings, delete the file in this location:
<tomcat>/conf/Catalina/localhost
50
Manual Database Creation and Other Information
6.3.10.2 JBoss
After setting up the buildomatic configuration for your database, the JBoss data source definition file will be automatically
created with the appropriate settings for JasperReports Server.
When the buildomatic target deploy-webapp-ce is run, the js-jboss-ds.xml will be automatically copied into the JBoss
instance.
You can view the automatically generated js-jboss-ds.xml at the following location:
<js-install>/buildomatic/build_conf/default/js-jboss-ds.xml (JBoss 5.1)
<js-install>/buildomatic/build_conf/default/js-jboss7-ds.xml (JBoss 7.1)
The final location of the js-jboss-ds.xml is:
<jboss>/server/default/deploy/js-jboss-ds.xml (JBoss 5.1)
<jboss>/server/default/deploy/js-jboss7-ds.xml (JBoss 7.1)
When JasperReports Server is running under JBoss, there are a couple of INFO log messages and an XML/A connection error
that might occur depending on the version of JBoss you are running with.
For more information, refer to troubleshooting section A.8.7, “JBoss Modifications,” on page 100.
6.3.10.3 Glassfish
After setting up the buildomatic configuration for your database, the Glassfish data source definition file js-glassfish-ds.xml
will be automatically created with the appropriate settings. When the buildomatic target deploy-webapp-ce is run, the file is
automatically deployed to the Glassfish instance.
You can view the automatically generated js-glassfish-ds.xml at the following location:
<js-install>/buildomatic/build_conf/default/js-glassfish-ds.xml
To deploy the datasource definition manually, you can run a command similar to the following:
asadmin add-resources "<js-install>/buildomatic/build_conf/default/js-glassfish-ds.xml"
51
JasperReports Server Community Project Installation Guide
Configuration File
<app-server>/<deployment>/WEB-INF/js.quartz.properties
Property Description
report.scheduler.mail.sender.host The name of the computer hosting the mail server
report.scheduler.mail.sender.username The name of the user in the mail server that JasperReports
Server can use
report.scheduler.mail.sender.port The port number that the mail server uses. For SMTP, the
default is typically 25 (values other than 25 may not work in
earlier JasperServer versions).
Configuration File
<app-server>/<deployment>/WEB-INF/applicationContext-report-scheduling.xml
If you used buildomatic to install JasperReports Server, the correct value of the Quartz driver delegate class is set
automatically for your database.
If you didn’t use buildomatic to install JasperReports Server, use this table to edit the js.quartz.properties file and set the value
of the Quartz driver delegate class to the correct value for your database:
Configuration File
<app-server>/<deployment>/WEB-INF/js.quartz.properties
MySQL org.quartz.impl.jdbcjobstore.StdJDBCDelegate
52
Manual Database Creation and Other Information
JBoss http://localhost:8080/jasperserver
GlassFish http://localhost:8080/jasperserver
If you installed JasperReports Server using buildomatic the Quartz table prefix is set automatically.
To set this value, edit the file <app-server>/<deployment>/WEB-INF/js.quartz.properties. Change the following property:
Property Description
quartz.tablePrefix The prefix for the quartz table, including any schema name.
If you installed using buildomatic these settings are handled automatically (in buildomatic import-export).
Property Description
quartz.delegateClass Set to the same value as described in section 6.4.2, “Database
Settings for the Quartz Driver Delegate Class,” on page 52.
53
JasperReports Server Community Project Installation Guide
54
Planning Your 4.7.0 Upgrade
Some of the new and enhanced features in JasperReports Server 4.7.0 can significantly affect your deployment and you should
plan your upgrade accordingly. Prior to upgrading to 4.7.0, you should make sure to back up your current JasperReports
Server installation and repository.
This chapter describes the following changes:
Themes: An upgraded user interface eliminates unnecessary white space and lets users see more on a single screen. There
have been changes to the resources and CSS used by themes, which make it easier to build and maintain new themes.
However, existing themes will have to be redesigned in order to work in 4.7. See“Upgrading Themes in 4.7.0” on
page 55 for details on how to upgrade themes.
Data Snapshots: Reports stored in JasperReports Server can now be configured to store snapshots of the report data in
the repository resource. Data snapshots load quickly without querying the data source, thus increasing performance and
reducing database load. If data snapshots are turned on, size requirements for your repository may increase dramatically.
Data snapshots are disabled globally by default. See “Data Snapshots” on page 63 for more information on data
snapshots.
For an overview of new features, improvements, and bug fixes see the release notes in the root directory of the distribution.
For information on how to use the new features, see the JasperReports Server User Guide or the JasperReports Server
Administrator Guide.
This chapter contains the following sections:
Upgrading Themes in 4.7.0
Data Snapshots
55
JasperReports Server Community Project Installation Guide
56
Planning Your 4.7.0 Upgrade
IE overrides (4.5.1 and earlier) lists.css (4.5.1 and earlier) lists.css (4.7)
.stepIndicator .icon { .stepIndicator .icon { .stepIndicator .icon {
*top: 2px; margin: 0; position: relative;
} top: 1px; margin: 0px;
margin-right: 3px; top: 1px;
} *top: 2px; \\* IE7 \\
margin-right: 3px;
}
57
JasperReports Server Community Project Installation Guide
and width) may have changed. You need to ensure your custom themes refer to these images. If you have used custom images,
you may need to adjust them to work with the new default scheme. This section lists the image files and indicates the changes.
Table 7-3 lists the images that have been added in the 4.7 default theme.
Table 7-3 New Images in 4.7.0 Default Theme
Table 7-4 lists the images that have been modified for the 4.7 default theme.
Table 7-4 Modified Images in 4.7.0 Default Theme
button_action_primary_sprite.png Background gradient images for the Removed rounded corners. Colors
three states of .action.primary were adjusted.
buttons
button_action_sprite.png Background gradient image for the up, Removed rounded corners. Colors
over, and pressed states of action were adjusted.
buttons
button_action_square_icons_sprite.png Button icons for the .action.square All icons have new shadow effect.
buttons
button_options_sprite.png Background images for the up, over, Removed rounded corners. Added
and pressed states of options buttons a shadow-only image for the
pressed state.
disclosure_indicators_sprite.png Small icons that disclose functionality in Shadow effect added to icons for
various parts of the application (within .button.capsule.indicator
buttons, menus, lists, and forms) .
home_icons_sprite.png Large icons for .action.jumbo button on Icons for View Reports and
home and admin home pages Create Ad Hoc View refactored.
input_bkgd.png Top inner shadow background image Shadow lightened. Image height
for text inputs changed from 2px tall to 3px tall.
58
Planning Your 4.7.0 Upgrade
menu_primaryNav_sprite.png Sprite containing background gradients Home icons reduced in size and
for mouse over effects and the home shadow effect added.
icon used in the main menu
panel_inset_inset_bkgd.png
tabs_horizontal_sprite.png Background gradient images for the Removed rounded corners. Colors
over and pressed states of horizontal adjusted.
tabs
tabs_vertical_sprite.png Background gradient images for the up, Removed rounded corners. Colors
over and pressed states of vertical tabs adjusted.
Table 7-5 lists the images that have not been affected by the refactoring of themes in 4.7.0.
Table 7-5 Images With No Modifications in 4.7.0
Image Usage
adhoc_datatree_icons_sprite.png Node and leaf images for fields, measures, and dimensions in the ad
hoc data tree
list_pressed_bkgd.png Background image for the top inner shadow that appears for the pressed
state of a .list.filter list item
lists_sprite.png Small icons used in various lists throughout the application. Also used
for tokens, menus and OLAP cell sorting
report_load_animation.gif Animation used in the toolbar of the interactive viewer when a report is
loading
sort_indicators_sprite.png Sprite containing icons used for the up, over, and pressed states of
sortable lists (ascending and descending)
wait_animation_large.gif "Please wait" animation used in dialog boxes on page loads and in
dashboard iframes when widgets are loading
59
JasperReports Server Community Project Installation Guide
Table 7-6 shows images used in the earlier themes that have been removed in 4.7.0, as well as images that have been
refactored by placing them in the file inner_pagination_sprite.png.
Table 7-6 Images from Previous Default Theme Removed in 4.7.0
first-d.gif Disabled state of "go to first" icon used Image placed in sprite file
for pagination controls inside report inner_pagination_sprite.png
dashboard widgets
first.gif "Go to first" icon used for pagination Image placed in sprite file
controls inside report dashboard inner_pagination_sprite.png
widgets
last-d.gif Disabled state of "go to last" icon used Image moved to sprite file
for pagination controls inside report inner_pagination_sprite.png.
dashboard widgets
last.gif "Go to last" icon used for pagination Image placed in sprite file
controls inside report dashboard inner_pagination_sprite.png.
widgets
60
Planning Your 4.7.0 Upgrade
next-d.gif Disabled state of next icon used for Image placed in sprite file
pagination controls inside report inner_pagination_sprite.png.
dashboard widgets
next.gif Next icon used for pagination controls Image placed in sprite file
inside report dashboard widgets inner_pagination_sprite.png.
61
JasperReports Server Community Project Installation Guide
prev-d.gif Disabled state of Previous icon used Image placed in sprite file
for pagination controls inside report inner_pagination_sprite.png
dashboard widgets
62
Planning Your 4.7.0 Upgrade
63
JasperReports Server Community Project Installation Guide
64
Upgrading from 3.7 - 4.5 to 4.7.0
This chapter describes the procedure for upgrading from JasperReports Server 3.7.0, 3.7.1, 4.0.0, 4.1.0, 4.2.1, or 4.5.0 to
JasperReports Server 4.7.0. The upgrade procedures described in this chapter use the JasperReports Server WAR File
Distribution ZIP release package and the included buildomatic scripts.
The procedure in this chapter can be used with JasperReports Server 4.5.0. However, we recommend you use the procedure in
Chapter 9, “Upgrading from 4.5.0 to 4.7.0,” on page 73.
The examples in this chapter use JasperReports Server 4.2.1.
This chapter contains the following sections:
Standard Upgrade Steps
Backing Up Your Previous JasperServer Instance
Exporting Old Repository Data
Preparing the JasperReports Server 4.7.0 WAR File Distribution
Configuring Buildomatic for Your Database and Application Server
Upgrading to JasperReports Server 4.7.0
Starting and Logging into JasperReports Server 4.7.0
Additional Tasks to Complete the Upgrade
Manual Upgrade Steps
65
JasperReports Server Community Project Installation Guide
cd <tomcat>
Windows: rename <tomcat>/webapps/jasperserver <tomcat>/js-4.2.1-war-backup
Linux: mv <tomcat>/webapps/jasperserver <tomcat>/js-4.2.1-war-backup
2. Back up the jasperserver database. Go to the location where you originally unpacked WAR file distribution zip for the
previous version or installed the previous version from the JasperReports Server installer:
a. Navigate to the location of your previous, unpacked WAR file distribution.
cd <js-install-4.2.1>
b. Back up the MySQL or PostgreSQL database using one of the following commands:
PostgreSQL
cd <js-install-4.2.1>
pg_dump --username=postgres jasperserver > js-db-4.2.1-dump.sql
MySQL
If you installed the previous release from the installer, specify --user=jasperdb in this command.
If you receive a packet size error, see section A.7.3, “Maximum Packet Size in MySQL,” on page 96.
Jaspersoft has tested the mysqldump utility for backing up and restoring MySQL databases, but there are
other MySQL backup mechanisms, some of which may work better for your JasperReports Server
installation.
66
Upgrading from 3.7 - 4.5 to 4.7.0
This operation uses the export option --everything which exports all your repository data.
Note the location of this export file so that you can use it during the 4.7.0 upgrade process.
This operation uses the export option --everything which exports all your repository data.
Note the location of this export file so that you can use it during the 4.7.0 upgrade process.
For Unix, the bash shell is required for the js-upgrade scripts. If you are installing to a non-Linux Unix platform such as
HP-UX, IBM AIX, FreeBSD or Solaris, you need to download and install the bash shell. See “Bash Shell for Solaris,
IBM AIX, HP UX and FreeBSD” on page 93 for more information.
67
JasperReports Server Community Project Installation Guide
Make sure you have backed up your jasperserver database before proceeding.
Make sure you have backed up your old JasperReports Server WAR file before proceeding.
68
Upgrading from 3.7 - 4.5 to 4.7.0
Commands Description
cd <js-install-4.7.0>/buildomatic Change to buildomatic directory
On MySQL, if you receive an error about packet size, see section A.7.3, “Maximum Packet Size in
MySQL,” on page 96.
If you have auditing enabled, see section A.10.1, “Include Audit Events on Upgrade,” on page 103 for
information on including auditing events.
8.6.3 Errors
If you encounter errors during the js-upgrade script execution, first look at the output log to see if you can spot any errors.
Also, refer to the Troubleshooting section Appendix A, “Troubleshooting,” on page 91. The information in this section
applies to js-upgrade scripts as well as js-install scripts.
If you need to modify values in your default_master.properties file, you can simply edit the file. When you run the js-upgrade
script again, the new values are used.
69
JasperReports Server Community Project Installation Guide
Your jasperadmin password might be reset to the default setting by the upgrade operation. For example, the
jasperadmin password might be reset to jasperadmin. For security reasons, you should change your
jasperadmin password to a non-default value.
Your JasperReports Server instance has now been upgraded to 4.7.0. In the event of startup or login problems, refer to
Appendix A, “Troubleshooting,” on page 91.
70
Upgrading from 3.7 - 4.5 to 4.7.0
To manually clear the repository cache database table, run a SQL command similar to one shown in this example:
update JIRepositoryCache set item_reference = null;
delete from JIRepositoryCache;
Commands Description
cd <js-install-4.7.0>/buildomatic
js-ant drop-js-db This will delete and recreate your jasperserver db. Make
js-ant create-js-db sure your original database is backed up.
js-ant init-js-db-ce
js-ant import-minimal-ce
js-ant import-upgrade The -DimportFile should point to the <path> and <filename>
-DimportFile="<path-and-filename>" of the js-4.2.1-export.zip file you created earlier.
On Windows, you must use double quotation marks (") if
your path or filename contains spaces. On Linux, you must
use double quotation marks, escaped with a backslash (\")
in this case.
71
JasperReports Server Community Project Installation Guide
Commands Description
js-ant import-sample-data-upgrade-ce (Optional) This step is optional; it loads the 4.7.0 sample
data. The old sample data is overwritten, so you may need
to redo certain changes such as configuring the sample data
sources for your database.
js-ant deploy-webapp-ce Delete the existing older war file, deploy the 4.7.0 war file.
On MySQL, if you receive an error about packet size, see section A.7.3, “Maximum Packet Size in
MySQL,” on page 96.
72
Upgrading from 4.5.0 to 4.7.0
This chapter describes how to upgrade from JasperReports Server 4.5.0 to JasperReports Server 4.7.0.
The examples describe how to use the js-upgrade shell scripts to carry out the upgrade from JasperReports Server 4.5.0 to
4.7.0. The steps are similar to the js-upgrade steps used in the previous chapter except the jasperserver database is not dropped
and recreated. Instead, a SQL script upgrades the database to a 4.7.0 database.
This chapter contains the following sections:
Upgrade Steps Overview
Backing Up Your Old JasperReports Server Instance
Preparing the JasperReports Server 4.7 WAR File Distribution
Configuring Buildomatic for Your Database and Application Server
Upgrading to JasperReports Server 4.7.0
Starting and Logging into JasperReports Server 4.7.0
Additional Tasks to Complete the Upgrade
Manual Upgrade Steps
73
JasperReports Server Community Project Installation Guide
If you receive an error about packet size, see section A.7.3, “Maximum Packet Size in MySQL,” on page 96.
For Unix, the bash shell is required for the js-upgrade scripts. If you are installing to a non-Linux Unix platform such as
HP-UX, IBM AIX, FreeBSD or Solaris, you need to download and install the bash shell. See “Bash Shell for Solaris,
IBM AIX, HP UX and FreeBSD” on page 93 for more information.
The following section contains example configurations using the PostgreSQL and MySQL databases.
74
Upgrading from 4.5.0 to 4.7.0
Make sure you have backed up your jasperserver database before proceeding.
Make sure you have backed up your old JasperReports Server WAR file before proceeding.
75
JasperReports Server Community Project Installation Guide
Commands Description
cd <js-install-4.7.0>/buildomatic
9.5.3 Errors
If you encounter errors during the js-upgrade script execution, look at the output log to see if you can spot any errors.
Additionally, you should refer to Appendix A, “Troubleshooting,” on page 91. The information in this section applies to
both js-upgrade scripts and the js-install scripts.
If you need to modify values in your default_master.properties file, you can simply edit the file. When the js-upgrade script is
run again, the new values will be used.
76
Upgrading from 4.5.0 to 4.7.0
Your JasperReports Server instance has now been upgraded to 4.7.0. In the event of startup or login problems, refer to
Appendix A, “Troubleshooting,” on page 91
To manually clear the repository cache database table, run a SQL command similar to one shown in this example:
update JIRepositoryCache set item_reference = null;
delete from JIRepositoryCache;
77
JasperReports Server Community Project Installation Guide
Older buildomatic upgrade steps for this chapter are the following:
Commands Description
cd <js-install-4.7.0>/buildomatic
js-ant import-minimal-for-upgrade-ce Loads themes and other core resources for 4.7.0.
js-ant import-sample-data-upgrade-ce (Optional) This step is optional. Loads the 4.7.0 sample
data.
js-ant deploy-webapp-ce Delete old 4.5.0 war file, deploy the 4.7.0 war file.
78
Upgrading JasperServer 3.5.0
If you are running JasperServer version 3.5.0, you must upgrade to 3.7.0 before you can upgrade to 4.7.0. Upgrading directly
from JasperServer 3.5.0 to 4.7.0 is not a certified (fully Jaspersoft-tested) procedure. To upgrade to 3.7.0, download the WAR
File Distribution zip package for 3.7.0 (jasperserver-ce-3.7.0-bin.zip).
The steps to perform this upgrade are documented in the JasperServer Installation Guide for the 3.7.0 release. Download the
JasperServer 3.7.0 WAR file distribution zip package to get the relevant files and documentation. The Installation Guide is in
the docs folder.
Download the JasperServer 3.7.0 WAR file distribution zip package from Jaspersoft technical support (http://
support.jaspersoft.com) or contact your sales representative.
If you are running a JasperServer version earlier than 3.5.0, first upgrade to 3.7.0, then to 4.7.0.
79
JasperReports Server Community Project Installation Guide
80
Changing Password Encryption in JasperReports Server
By default, password encryption is enabled in JasperReports Server and passwords are stored as cipher text in the database.
System administrators can change the encryption algorithm and specify the salt key used to initiate the encryption algorithm.
This chapter describes the procedure to enable password encryption if you have a JasperReports Server instance without
encryption turned on. For more information about encryption options, see the JasperReports Server Administrator Guide.
This chapter contains the following sections:
Backing Up Your JasperReports Server Database
Stopping Your Application Server
Running the Repository Export Utility
Specifying Encryption Settings in the JasperReports Server WAR
Specifying Encryption Settings for the Import Utility
Recreating the JasperReports Server Database
Importing Your Repository Data
Starting the Application Server
Logging into JasperReports Server
81
JasperReports Server Community Project Installation Guide
For information about running the export utility, refer to Chapter 12, “Configuring the Import-Export Utilities,” on
page 87.
The text jaspersoftInSanFrancisco is 24 characters long, therefore the two properties above work with
their default values. However, for better security, we recommend that they be changed.
5. The last two properties may be left unchanged. They are set to DESede by default. The default values are the following:
<property name="secretKeyAlgorithm"><value>DESede</value></property>
<property name="cipherTransformation"><value>DESede/CBC/PKCS5Padding</value></property>
6. Save and close the file. Encryption is now enabled for the JasperReports Server application upon the next restart.
82
Changing Password Encryption in JasperReports Server
Configuration File
…\WEB-INF\applicationContext-security.xml
secretKey passwordEncoder The salt key to use as a pass phrase when encrypting
passwords. This string is used to encrypt passwords.
This value can be a simple string or a numeric
representation that can be parsed by Integer.decode().
For example:
String:
This is my secret key
Numeric representation:
0xC8,0x43,0x29,0x49,0xAE,0x25,0x2F,0xA1,0xC1
The secretKey, secretKeyAlgorithm, and cipherTransformation must be consistent with each other. For example, if the
secretKeyAlgorithm is DESede, the secretKey must be 24 bytes long. For more information about secretKey,
secretKeyAlgorithm, and cipherTransformation, see Sun’s javax.crypto documentation.
83
JasperReports Server Community Project Installation Guide
For information about running the import utility, see Chapter 12, “Configuring the Import-Export Utilities,” on page 87.
84
Changing Password Encryption in JasperReports Server
85
JasperReports Server Community Project Installation Guide
86
Configuring the Import-Export Utilities
The import and export utilities add resources to or extract resources from the JasperReports Server repository. Typically, users
export data from their previous instance and import it into their new installation when upgrading JasperReports Server. The
import utility is also used at installation time to load the sample data into the repository.
This chapter covers the basic importing and exporting commands. For more information about command options, see the
JasperReports Server Administrator Guide.
This chapter contains the following sections:
Introduction
Import-Export Configuration Files
Changing Your Configuration Settings
Deploying a JDBC Database Driver
Running Import or Export
Configuring the Import-Export Utility for JasperServer 3.7
12.1 Introduction
You can import and export resources by running either of these types of scripts:
js-export-ce.bat js-export-ce.sh
87
JasperReports Server Community Project Installation Guide
The redundant sets of commands are being merged, and eventually, all database configuration will be done automatically from
the buildomatic/default_master.properties. However, as of JasperReports Server version 4.7.0, this merging work is not
complete.
If you are running the js-import-ce.sh/bat or js-export-ce.sh/bat shell scripts, you might have to manually configure some
databases as described in the following section.
<js-install>/buildomatic/js-export-ce.bat and .sh Export scripts for Windows and Linux, respectively
<js-install>/buildomatic/default_master.properties File that you must edit (already in place if you installed from
the binary installer)
<js-install>/buildomatic/conf_source/ieCe/lib All of the JasperReports Server jar files and the JDBC driver
location
88
Configuring the Import-Export Utilities
MySQL metadata.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
(MySQL 5.1)
metadata.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
(MySQL 5.5)
metadata.jdbc.driverClassName=com.mysql.jdbc.Driver
metadata.jdbc.url=jdbc:mysql://localhost:3306/
jasperserver?useUnicode=true&characterEncoding=UTF-8
metadata.jdbc.username=root
metadata.jdbc.password=password or
metadata.jdbc.encryptedPassword=encrypted-password
89
JasperReports Server Community Project Installation Guide
If your repository contains international characters, you may need to perform additional configuration for the import and
export utilities. See section A.9.1, “Exporting a Repository That Contains UTF-8,” on page 102.
For complete information on the standard import-export options refer to the JasperReports Server Administrator Guide.
90
Troubleshooting
APPENDIX A TROUBLESHOOTING
Windows: <js-install>/installation.log
Linux: <js-install>/installation.log
Mac <js-install>/installation.log
If you have tried multiple installs, make sure you view the most recent install log file.
91
JasperReports Server Community Project Installation Guide
The solution is to download and install the Sun Java JDK, labeled as the Java SE Development Kit on the Sun web site.
If you are upgrading JasperReports Server, you can also use the Java 1.6 JDK bundled in the previously installed version, as
described in section 8.8.1, “Handling JasperReports Server Customizations,” on page 70.
92
Troubleshooting
93
JasperReports Server Community Project Installation Guide
If you try and use the bundled ant that is included with the JasperServer WAR file Distribution ZIP package, you may get the
same non-bash syntax error. You may get the error below, for example:
js-ant help-install
ANT_HOME=../apache-ant: is not an identifier
If you have the bash shell installed, you can try executing the js-ant command by calling bash explicitly, for example:
bash js-ant help-install
94
Troubleshooting
To start and stop the PostgreSQL and Tomcat components separately from the command line shell:
1. Open a Terminal shell (Finder > Go > Utilities > Terminal Icon).
2. Navigate to the <js-install> folder.
For instance: /Applications/jasperreports-server-<ver>.
3. To Start:
./ctlscript start postgresql
./ctlscript start tomcat
4. To shutdown:
./ctlscript stop
or
./ctlscript stop tomcat
./ctlscript stop postgresql
If you install the server from the WAR file distribution, using either js-install or buildomatic scripts, there is no problem.
95
JasperReports Server Community Project Installation Guide
This section contains information that may help resolve other connectivity issues.
If you entered a different port when you installed your database, the JasperReports Server installer prompts you for the port
number, and configures the server to communicate properly. If the port number has changed, or if you encounter a problem,
check the database configuration files to verify your port number.
If it is incorrect, change it to the correct port number, save the file, and restart the application server. For more information, see
section A.8.3, “Configuration File Locations,” on page 98.
96
Troubleshooting
query strings in the JRXML file of a saved report match the actual table names found in the database. A mismatch may occur
if you are transferring data from one database to another, which may cause the capitalization of table names to change.
Under Windows MySQL, table and column names are not case-sensitive.
Under Linux MySQL, table and column names are case-sensitive. Linux MySQL can be configured to be non-case-sensitive
by setting the configuration parameter lower_case_table_names to 1 in the my.ini or my.cnf file. For more information
search the MySQL documentation for a section about identifier case sensitivity.
Table and column names in PostgreSQL are case-sensitive.
If you see this error you will need to check your Quartz properties file found at the following location:
<tomcat>/webapps/jasperserver/WEB-INF/js.quartz.properties
Make sure that the following property does not have the standard driver delegate, but instead has the PostgreSQL specific
driver delegate. It should look like the following for PostgreSQL:
quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
97
JasperReports Server Community Project Installation Guide
Tomcat: <tomcat>/webapps/jasperserver/META-INF/context.xml
<tomcat>/webapps/jasperserver/WEB-INF/hibernate.properties
<tomcat>/apache-tomcat/webapps/jasperserver/WEB-INF/web.xml (JNDI config)
<tomcat>/apache-tomcat/config/Catalina/localhost/jasperserver.xml (delete: see below)
JBoss: <jboss>/server/default/deploy/js-postgresql-ds.xml or js-<mysql>-ds.xml
<jboss>/server/default/deploy/jasperserver.war/WEB-INF/hibernate.properties
<jboss>/server/default/deploy/jasperserver.war/WEB-INF/web.xml
<jboss>/server/default/deploy/jasperserver.war/WEB-INF/jboss-web.xml
GlassFish: <glassfish>/domains/domain1/autodeploy/jasperserver.war/WEB-INF/hibernate.properties
<glassfish>/domains/domain1/autodeploy/jasperserver.war/WEB-INF/js.quartz.properties
<glassfish>/domains/domain1/config/domain.xml
98
Troubleshooting
99
JasperReports Server Community Project Installation Guide
<category name="org.jboss.resource.connectionmanager.CachedConnectionManager">
<priority value="WARN"/>
</category>
100
Troubleshooting
When running the buildomatic scripts to deploy to JBoss, the xercesImpl-3.7.jar file is automatically deleted in order to
fix this problem.
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
101
JasperReports Server Community Project Installation Guide
Remove the comment markers from lines 2 and 4 above, then restart Apache-Tomcat for the change to take effect. For other
application servers, refer to the product documentation.
<Context useHttpOnly="false">
...
</Context>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
...
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
102
Troubleshooting
103
JasperReports Server Community Project Installation Guide
104