If you are currently running a Community Project (CP) instance of JasperReports Server and you would like to upgrade to a commercial version of JasperReports Server, follow the instructions in this chapter.
The steps in this section use the JasperReports Server commercial WAR File Distribution release package and the included buildomatic scripts to carry out the upgrade.
This CP to commercial upgrade procedure is only valid for upgrade within a major JasperReports Server release, for example 6.0 CP to 6.0 commercial. |
This chapter contains the following sections:
• | General Procedure |
• | Backing Up Your JasperReports Server CP Instance |
• | Exporting Your CP Repository Data |
• | Preparing the JasperReports Server 6.0 WAR File Distribution |
• | Configuring Buildomatic for Your Database and Application Server |
• | Upgrading to the Commercial Version of JasperReports Server 6.0 |
• | Starting and Logging into JasperReports Server 6.0 |
• | Re-Configuring XML/A Connections (Optional) |
General Procedure
The upgrade procedure consists of the following main steps:
1. | Back up your JasperReports Server CP instance. |
2. | Export your CP repository data. |
3. | Upgrade your instance to JasperReports Server Commercial. |
4. | Import your CP repository data. |
If you customized or extended JasperReports Server CP, you need to keep track of these modifications and re-integrate them into your JasperReports Server commercial instance after completing the upgrade.
Backing Up Your JasperReports Server CP Instance
First, backup the old JasperReports Server CP WAR file and jasperserver database in the event of a problem with the upgrade. These steps are performed from the command line in a Windows or Linux shell.
These instructions assume you have Tomcat application server and the PostgreSQL or MySQL database. You perform a similar procedure if you have another application server. If you have another database, consult your DB administration documentation for back up information.
Backing Up Your JasperReports Server CP WAR File
For example, for Apache Tomcat, back up the jasperserver directory from the <tomcat>/webapps folder:
1. | Go to the <tomcat> directory. |
2. | Make a new directory named js-cp-war-backup. |
3. | Copy <tomcat>/webapps/ jasperserver to <tomcat>/js-cp-war-backup. |
4. | Delete the <tomcat>/webapps/jasperserver directory. |
Backing Up Your JasperReports Server Database
Go to the location where you originally unpacked your CP WAR file distribution zip. (Or create a new local folder to hold your backup file.)
1. | Go to the <js-install-cp> directory. |
2. | Run one of the following commands: |
• | For PostgreSQL on Windows or Linux: |
cd <js-install-cp>
pg_dump --username=postgres jasperserver > js-db-cp-dump.sql
• | For MySQL on Windows: |
mysqldump --user=root --password=<password> jasperserver > js-db-cp-dump.sql
For MySQL on Linux:
mysqldump --user=root --password=<password> --host=127.0.0.1 jasperserver >js-db-cp-dump.sql
For MySQL, if you receive an error about packet size, see the Troubleshooting appendix of the JasperReports Server Installation Guide. |
Exporting Your CP Repository Data
Before exporting your CP repository data, check to see that you have the default_master.properties file in this directory.
<js-install-cp>/buildomatic/default_master.properties
If you do not have a default_master.properties file, see Example Buildomatic Configuration . This file holds the settings that are specific to your JasperReports Server instance, such as your application server location and your database type and location.
To export your CP repository data:
1. | Navigate to the buildomatic directory: |
cd <js-install-cp>/buildomatic
2. | Run buildomatic with the export target: |
Windows: | |
Linux: |
This operation uses the export option --everything, which collects all your repository data.
Remember the path to your exported file. You need to specify it when you import into your commercial JasperReports Server repository.
Preparing the JasperReports Server 6.0 WAR File Distribution
Use the buildomatic scripts included in the commercial 6.0 WAR file distribution release package to carry out the upgrade. Follow these steps to obtain and unpack the commercial 6.0 WAR file distribution ZIP file:
1. | The WAR file distribution comes in a file named jasperreports-server-6.0-bin.zip in the compressed ZIP format. Download the WAR file distribution from Jaspersoft technical support or contact your sales representative. |
2. | Extract all files from jasperreports-server-6.0-bin.zip. Choose a destination, such as C:Jaspersoft on Windows, /home/<user> on Linux, or /Applications on Mac OSX. |
After you unpack the WAR File Distribution Zip, the resulting location is known as:
<js-install-pro>
Configuring Buildomatic for Your Database and Application Server
This upgrade procedure uses the buildomatic scripts included with the WAR File Distribution ZIP release package to carry out the upgrade.
Example Buildomatic Configuration
The upgrade configuration is handled by the default_master.properties file. Jaspersoft provides a sample configuration file for each database. You must specify your database credentials and your application server location, and rename the file to default_master.properties.
PostgreSQL Example
This example uses PostgreSQL (the same general logic applies to other databases).
1. | Copy postgresql_master.properties from: |
<js-install-pro>/buildomatic/sample_conf
2. | Paste the file to: |
<js-install-pro>/buildomatic
3. | Rename the file to: default_master.properties |
4. | Edit default_master.properties for your database and application server. Sample property values are: |
appServerType=tomcat6 (or tomcat7, tomcat5, jboss, glassfish)
appServerDir=c:Apache Software Foundationtomcat-6.0.26 (for example)
dbUsername=postgres
dbPassword=postgres
dbHost=localhost
MySQL Example
This example uses MySQL (the same general logic applies to other databases).
1. | Copy mysql_master.properties from: |
<js-install-pro>/buildomatic/sample_conf
2. | Paste the file to: |
<js-install-pro>/buildomatic
3. | Rename the file to: default_master.properties |
4. | Edit default_master.properties for your database and application server. Sample property values are: |
appServerType=tomcat6 (or tomcat7, tomcat5, jboss, glassfish)
appServerDir=c:Apache Software Foundationtomcat-6.0.26 (for example)
dbUsername=root
dbPassword=password
dbHost=localhost
Upgrading to the Commercial Version of JasperReports Server 6.0
After configuring the default_master.properties file, you can complete the upgrade.
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. |
1. | Stop your application server. |
2. | Start your database server. |
3. | Run the following commands: |
Commands | Description |
| |
js-ant drop-js-db[/code] js-ant create-js-db[/code] js-ant init-js-db-pro[/code] | The first command will delete your jasperserver db. Make sure it is backed up. The other commands will recreate and initialize the database. |
Adds superuser, Themes, and default tenant structure. | |
js-ant import-upgrade -DimportFile=<path>/js-cp-export.zip -DimportArgs="--include-server-settings" | The -DimportFile argument should point to the 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. |
(Optional) This step is optional. Loads the 6.0 commercial sample data. | |
Delete the CP war file, and deploy the commercial (pro) war file. |
On MySQL, if you receive an error about packet size, see the Troubleshooting appendix of the JasperReports Server Installation Guide.. |
Starting and Logging into JasperReports Server 6.0
Before starting the server:
1. | Set up the JasperReports Server License. |
Copy the <js-install-pro>/jasperserver.license file to the C:Users<user> directory (Windows 7 example)
For information about how to set up the license, see the JasperReports Server Installation Guide.
2. | Delete any files that might exist in the <tomcat>temp folder. |
3. | Delete any files, directories, or sub-directories that exist in the folder: <tomcat>workCatalinalocalhost. |
4. | Delete any jasperserver*.xml files that might exist in the folder: <tomcat>confCatalinalocalhost. |
5. | Move any existing <tomcat-install>logs files into a backup directory to clean up old CP log data. (optional). |
For information about how to clear directories, see sections Clearing the Application Server Work Folder, Clearing the Application Server Temp Folder, and Clearing the Repository Cache Database Table.
Now, start your Tomcat, JBoss, or GlassFish application server. Your database should already be running.
Clearing Your Browser Cache
Before you log in, make sure you and your end-users clear the Browser cache. JavaScript files, which enable UI elements of JasperReports Server, are typically cached by the browser. Clear the cache to ensure that the newer files are used.
Logging into the Commercial Version of JasperReports Server 6.0
Log in using the following URL, user IDs, and passwords:
URL: http://localhost:8080/jasperserver-pro
User ID | Password | Description |
System-wide administrator | ||
Administrator for the default organization |
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 and superuser passwords to non-default values. |
Your JasperReports Server instance has now been upgraded from Community Project (CP) to commercial. In the event of startup or login problems, refer to the Troubleshooting appendix of the JasperReports Server Installation Guide.
Re-Configuring XML/A Connections (Optional)
XML/A connection definitions contain a username and password definition in order to make the Web Services connection to the server. A commercial edition of JasperReports Server supports multi-tenancy, which allows multiple organizations to co-existing on a single instance. JasperReports Server users must belong to a specific organization (except for superuser). The default organization in JasperReports Server is organization_1.
After upgrading from the CP to commercial version of JasperReports Server, users belong to the default organization that is part of the core data setup in the commercial version. You need to update any XML/A connection definitions to include the organization that the user belongs to.
In addition, the XML/A connection specifies an instance URI. This URI will need to be updated to point to a commercial URI.
If you are using XML/A connections, edit your XML/A connections as shown in the following examples:
• | User IDs |
Change “jasperadmin” to “jasperadmin|organization_1”
Change “joeuser” to “joeuser|organization_1”
• | URI values |
Change:
http://localhost:8080/jasperserver/xmla
to
Recommended Comments
There are no comments to display.