Create and Load Sample Data

The procedure forBuilding JasperReports Server Source Code loads core data required to start the application, but it doesn't create sample data, such as sample reports to run and sample databases. Follow the steps below to create and load sample data.

Load Sample Data

The buildomatic scripts can load sample resources and sample databases. Note: In the procedure below, your jasperserver database will be deleted and re-created unless you choose ‘n’ for No when prompted.

Your default_master.properties should already be created.

1. Start your database server.
2. Stop your application server.
3. Run the commands shown below:

 

Commands

Description

cd <js-src>/jasperserver/buildomatic

 

js-ant create-load-all-dbs-pro

Creates and loads the jasperserver database

Imports core bootstrap resources

Creates and loads sample databases

Imports sample resources

(Choose ‘n’ when prompted if you do not want to recreate your jasperserver database.)

Generate Your Own Sample Resources

To generate sample resources from scratch, execute the sample creation code found in the following folder:

<js-src>/jasperserver-pro/production-tests

This procedure generates the same resources imported and used by the released version of JasperReports Server. Your jasperserver database will be deleted and re-created.

Your default_master.properties should have already been created.

Generating Sample Resources for MySQL, PostgreSQL, Oracle, and SQL Server Databases

1. Start your database server.
2. Stop your application server.
3. Run the commands shown below:

Commands

Description

cd <js-src>/jasperserver/buildomatic

 

js-ant init-js-db-pro

Initialize the jasperserver database.

js-ant run-production-data-pro

Generate sample resources using the processing logic from the production-test source code.

Generating Sample Resources for the DB2 Database

The buildomatic scripts cannot automatically connect to a remote DB2 database and carry out admin operations, so you have to perform additional steps to create the databases.

The DB2 client software, db2 or db2cmd, can be used to interact with DB2.

1. Start your database server.
2. Stop your application server.
3. If the database already exists, remove it before creating a new one.
4. Run the commands shown below:

Commands

Description

db2 create database jsprsrvr using codeset utf-8 territory us pagesize 16384

Create and initialize the jasperserver database.

db2 create database sugarcrm

Optionally, create the sugarcrm database.

db2 create database foodmart

Optionally, create the foodmart database.

Version: 
Feedback