JasperServer (JS) builds on JasperReports (JR) as a comprehensive family of Business Intelligence (BI) products, providing robust static and interactive reporting, report server, and data analysis capabilities. For business intelligence users, Jaspersoft offers JasperAnalysis, which runs seamlessly on JasperServer.
Note: This blog is updated based on JS-3.5 GA release
What’s New in JasperServer 3.5
JasperServer now includes these features:
- Upgrade Mondrian to 3.0
- Dimension sharing within a cube
- Support for dozens of new scalar functions in MDX
- New JasperAnalysis UI
- Improved look and feel as well as an improved tool bar within analysis views.
- Encrypt JDBC password
- Export/Import now supports encryption of JDBC passwords
- Configurable Scheduler Intervals
- The admin can decide which recurrence options are displayed to users by editing the recurrenceIntervalUnits bean in the WEB-INF/flows/reportJobBeans.xml.
- Support for Gantt Charts in JasperReports
- JasperReports, the Java reporting library at the heart of JasperServer now supports Gantt charts.
- Revamped user and role pages
- Includes support for large numbers of users, including search.
- XML-based Chart Themes
- iReport includes the ability to create and edit chart theme in a visual editor.
- Font Extensions
- JasperReports leverages its existing extension support to allow the use of TTF files in report templates without installing them into the system; the same logical font name can be resolved into different TTF files depending on the locale, covering multiple languages.
- Multiple Scriplets per Report and Report Governors
- JasperReports now allows multiple scriplet instances per report template. Some such scriptlets can be declared globally to act as report governors, preventing invalid report layouts from causing infinite loops when the report is filled. JasperServer also provides default governor implementations that limit report execution based on a maximum number of pages and/or timeout.
In order to install JasperServer, you need to setup and configure the following application.
- Apache Tomcat (with JDK1.6 or JDK1.5) – to be use as Java container
- PostgreSQL 8.3 – to be use to store JasperServer metadata files
- PostgreSQL 8.3 JDBC Driver – Download correct JDBC driver based on PostgreSQL and Java version
Note: You may use JBoss and MySQL as an alternative to the above application.
How to install JasperServer?
JasperServer installation is very easy as no complicated process involved. In this guide, we will use the stand-alone WAR file distribution. Follow the step-by-step below to complete the installation.
A. Download and Unpack JasperServer file
The WAR file distribution comes in a ZIP file format. Please download the file from www.jasperforge.com. Once you have downloaded the WAR file distribution, you need to unpack it in order to access the contained files. Go to any working directory location to unpack the ZIP file.
user@server:~# unzip jasperserver-3.5-bin.zip user@server:~# ls apache-ant docs jasperserver.war js-installer-version.txt license.txt releaseNotes.txt samples scripts
B. Setup the JasperServer database
- Connect to the PostgreSQL database and create a user for JasperServer. In this document, we will use “jasperadmin” as JS database user with the password is “dbpassword“.
postgres> CREATE USER jasperadmin PASSWORD 'dbpassword';
- Create a database for JasperServer with jasperadmin as database owner and UTF-8 encoding. In this example, we will use “prd_jasperserver” as database name.
postgres> CREATE DATABASE prd_jasperserver OWNER jasperadmin ENCODING 'UTF-8';
- Connect to the JasperServer database
postgres> \c prd_jasperserver prd_jasperserver>
- Create the schema for JasperServer (Refer attached file). If you already have the database dump, please skip the steps below.
prd_jasperserver> \i js-3.5-create-schema.sql
- Populate the database with default user login credential.
prd_jasperserver> \i js-3.5-create-default-security.sql
C. Install/Deploy JasperServer into Tomcat
Because the JasperServer is stand-alone JSP files, the installation process involves dropping the files into the webapps directory of the Tomcat server. If you decided to use JasperServer as default page, then you should put the files into ROOT directory.
user@server:~# cd $TOMCAT_ROOT/webapps user@server:~# mkdir jasperserver user@server:~# cd jasperserver/ user@server:~# jar xvf /home/user/jasperserver.war user@server:~# ls cal images j openflashchart wcf externalResource.htm index.htm jpivot scripts WEB-INF favicon.ico inputControl.htm META-INF stylesheets
Allocate static memory for Tomcat (Java). The default memory is not enough to extract data which is more than 1000 records (estimation only). To do this, edit the $TOMCAT_ROOT/bin/setclasspath.sh and add the following lines at the end of file.
JAVA_OPTS="$JAVA_OPTS -Xms512m -Xmx512m -XX:PermSize=32m -XX:MaxPermSize=128m -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled "
Note: It is best to allocate the same amount RAM for Xms (min) and Xmx (max). Change the value based on total memory installed on the machine.
D. Edit configuration files
There are few configuration files that need to edit. The list of files and its contents as below:
<Context path="/jasperserver" antiJARLocking="true" debug="5" reloadable="true" crossContext="true"> <Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="jasperadmin" password="dbpassword" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost:5432/prd_jasperserver" defaultAutoCommit="false"/> </Context>
org.quartz.scheduler.instanceName=JasperServerScheduler org.quartz.threadPool.threadCount=20 org.quartz.threadPool.threadPriority=5 org.quartz.jobStore.misfireThreshold=180000
quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate quartz.tablePrefix=QRTZ_ quartz.extraSettings= report.scheduler.mail.sender.host=smtp.raj2u.net report.scheduler.mail.sender.username=username report.scheduler.mail.sender.password=password firstname.lastname@example.org report.scheduler.mail.sender.protocol=smtp report.scheduler.mail.sender.port=25 report.scheduler.web.deployment.uri=http://localhost:8080/jasperserver
Note: Don’t forget to put all the required JDBC drivers in $TOMCAT_ROOT/lib or $TOMCAT_ROOT/common/lib
Now you may start the Tomcat and check the Tomcat’s log file to see that there are not serious errors on the startup. If JasperServer started up properly, you should be able to login. Login by going to the following URL: http://host-address:port/jasperserver. The default username is “jasperadmin” and the password is “mypassword“. The user credential can be found in the attached file (js-3.5-create-default-security.sql). FYI, the password encryption is already enabled by default in JasperServer 3.5, therefore the password in database is encrypted.