Procedure for Installing the WAR File for WebLogic¶
To meet the prerequisites for installing the WAR file for WebLogic:
- Check that a supported version of the Oracle/Sun Java JDK is installed.
- Check that the
JAVA_HOMEsystem environment variable points to the JDK. - Install the PostgreSQL, MySQL, Oracle, SQL Server, or DB2 database.
Note
The target database can be on a remote server.
Due to limitations in the vendor's driver for MySQL, Jaspersoft has verified MySQL using the MariaDB driver.
To install the WAR file for WebLogic:
-
Extract all files in
js-jrs``_10.1.0_bin.zipinto a top-level directory, such asC:\Jaspersofton Windows or/home/<user>on Linux.Unpacking the ZIP file creates the directory
js-jrs_``pro`` _10.1.0_bin.zip.
-
Check that WebLogic is installed in the default location on your local machine.
If WebLogic is not installed in the default location, or if you encounter problems using the buildomatic scripts, set up the database manually as described in Manually Creating the JasperReports Server Database. After setting up the database manually, skip Step 6 through Step 9 , and proceed to Step 10.
-
(If you are using MySQL, you can skip this step.) Copy your JDBC driver to WebLogic.
PostgreSQL Example:-
Copy the JDBC jar:
From:<js-install>/buildomatic/conf_source/db/postgresql/jdbcTo:
<weblogic_home>/server/libNote that the MySQL JDBC driver is included in recent versions of WebLogic.
-
-
To ensure you have full support for import/export from the command line, copy your JDBC driver to the following location. If you are not using the command line for import/export, you can skip this step:
from: <js-install>\buildomatic\conf_source\db\<your_database>\jdbc\to: <js-install>\buildomatic\conf_source\iePro\lib -
Restart WebLogic using
startWebLogic.cmd/sh. -
Copy the .properties file for your database:
From:
<js-install>/buildomatic/sample_conf/To:
<js-install>/buildomatic -
Rename the file that you copied to the
default_master.propertiesfile. -
Edit the default_master.properties file to add settings specific to your database and your application server. Sample Values for the default_master.properties File shows sample property values.
Note
When appServerType = skipAppServerCheck, buildomatic skips the application server type validation. Use this setting when installing JasperReports Server with WebLogic. Backslashes in appServerDir must be doubled, for example C:\\WL\\Application_Server. Make sure that there are no spaces in the appServerDir path.
Sample Values for the default_master.properties File
Database
Sample Property Values
PostgreSQL
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] dbUsername=postgres dbPassword=postgres dbHost=localhostDB2
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] dbUsername=db2inst1 dbPassword=password dbHost=localhostMySQL
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] dbUsername=root dbPassword=password dbHost=localhostOracle
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] sysUsername=system sysPassword=password dbUsername=jasperserver dbPassword=password dbHost=hostnameNote that
dbUsernamemust be the same as the Oracle username.SQL Server
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] dbUsername=sa dbPassword=sa dbHost=localhostFor the Split installation, configure the additional settings in the
default_master.propertiesfile as described in Additional Buildomatic Configuration for Split Installation Upgrade.For the JNDI Restricted Access installation, configure the additional settings in the
default_master.propertiesfile as described in Installation Types. -
Set up the database and optional sample databases using the buildomatic Ant scripts. Enter the commands in the table below to call buildomatic Ant scripts:
Note
Exception: For DB2, skip this step and perform Step 1 to Step 4 in DB2, then go to Step 10 of this procedure.
You call buildomatic Ant scripts from the command line using the following syntax:
Windows — js-ant <target-name>Linux — ./js-ant <target-name>Buildomatic Targets to Run
Commands
Description
cd <js-install>/buildomaticGoes to the buildomatic directory.
js-ant create-js-dbCreates the jasperserver repository database. js-ant init-js-db-projs-ant import-minimal-proInitializes database, loads core application data.
js-ant create-sugarcrm-dbjs-ant create-foodmart-db(Optional) Creates sample databases. js-ant load-sugarcrm-dbjs-ant load-foodmart-db(Optional) Loads sample data into the sample databases. js-ant import-sample-data-pro(Optional) Loads the demos that use the sample data.
js-ant create-audit-db(Optional) Creates the audit database. Required only for the Split installation.
js-ant init-audit-db-pro(Optional) Initializes the audit database. Required only for the Split installation. Note
On non-Linux Unix platforms, the js-ant commands may not be compatible with all shells. If you have errors, use the
bashshell explicitly. For more information, see Bash Shell for Solaris, IBM AIX, HP UX and FreeBSD.Note
Installing JasperReports Server automatically generates encryption keys that reside on the file system. These keys are stored in a dedicated Jaspersoft keystore. Make sure that this keystore is properly secured and backed up, as described in the JasperReports Server Security Guide.
-
Add the database driver location to the WebLogic classpath in the following file:
<weblogic_home>/domains/<user_domain>/bin/setDomainEnv.shUse the path for the driver copied in Step 3. For example, for a PostgreSQL driver, you might add the following:
export CLASSPATH=/opt/Oracle/Middleware/Oracle_Home/wlserver/server/lib/postgresql.jar:
/opt/Oracle/Middleware/Oracle_Home/wlserver/server/lib/jswlstc-1.0.jar:$CLASSPATH -
In WebLogic, open an Administrative Console window and navigate to Services > *Data Sources* or Domain Configurations > Services > Data Sources.
-
Click New and then Generic Data Source for each of the data source columns in the following table, and enter the following values for a PostgreSQL database. You will need to click Next after entering the database driver and after One-Phase Commit.
Note
To use a database other than PostgreSQL, configure the database connections using the settings shown in Configuring Databases Using the Vendor's Driver.
If you plan to use the sample databases (Foodmart and Sugar CRM), perform this step and the following step for each database.
Parameter Name JasperReports Server JasperReports Server Audit JasperServerSystemDataBase AuditAnalyticsDataBase Foodmart Sugar CRM Name
JasperServerDataBase
AuditDataBase
Jasper Server System DataBase Audit Analytics DataBase FoodmartDataBase
SugarcrmDataBase
JNDI Name
JasperServerDataBase
AuditDataBase
JasperServerSystemDataBase AuditAnalyticsDataBase FoodmartDataBase
SugarcrmDataBase
Database Type
PostgreSQL
Database Driver
PostgreSQL Driver Versions: using org.postgresql.Driver
Supports Global
TransactionsSelected
One-Phase Commit
Selected
-
Set connection properties. Sample properties for a PostgreSQL database are:
Parameter Name JasperReports Server JasperReports Server Audit Foodmart Sugar CRM Database Name
jasperserver
For Compact installation: jasperserver
For Split installation: jsauditfoodmart
sugarcrm
Host Name
localhost
Port
5432
Database username
PostgreSQL
Password
PostgreSQL
Confirm Password
PostgreSQL
-
Test the database connection:
-
For SugarCRM and Foodmart, use the default connections:
JDBC:postgresql://localhost:5432/sugarcrm
jdbc:postgresql://localhost:5432/foodmart
-
Change the URL for the JasperServerDataBase to:
jdbc:postgresql://localhost:5432/jasperserver
-
Change the URL for the AuditDataBase to:
For Compact installation: jdbc:postgresql://localhost:5432/jasperserver
For Split installation: jdbc:postgresql://localhost:5432/jsaudit
-
Change the URL for the JasperServerSystemDataBase to:
jdbc:postgresql://localhost:5432/jasperserver
-
Change the URL for the AuditAnalyticsDataBase to:
For Compact installation: jdbc:postgresql://localhost:5432/jasperserver
For Split installation: jdbc:postgresql://localhost:5432/jsaudit
-
-
Select targets and ensure that AdminServer is set for all data sources.
-
In WebLogic, open an Administrative Console window and navigate to Services > Data Sources or Domain Configurations > Services > Data Sources.
-
Select each created data source (JasperServerDataBase, AuditDataBase, FoodmartDataBase, and SugarcrmDataBase)
-
Select the Connection Pool tab and increase the Maximum Capacity setting, depending on load. For most installations, a Maximum Capacity in the range 50 – 100 should be sufficient. If you receive connection pool errors, increase this setting; see the documentation for WebLogic for more information.
-
On the Connection Pool tab, expand Advanced and enable Test Connections On Reserve. Set the Test Frequency to 30 seconds and set the Test Table Name for your datasource and database type. Sample properties for a PostgreSQL database are:
Parameter Name JasperReports Server JasperReports Server Audit JasperServerSystemDataBase AuditAnalyticsDataBase Foodmart Sugar CRM Name JasperServerDataBase AuditDataBase Jasper Server System DataBase Audit Analytics DataBase FoodmartDataBase SugarcrmDataBase Test Table Name JIREPORTJOB JIREPORTJOB JIREPORTJOB JIREPORTJOB ACCOUNT ACCOUNTS -
Click Save.
-
Use the Java jar tool or an unzip tool to unpack the jasperserver-pro.war file. For example, using the Java jar tool, enter these commands to unpack the jasperserver-pro.war file to a folder:
-
Search for conflicting JARs and delete them from the WAR file. If the following JARs are present in your WebLogic installation, you need to delete them from your JasperReports Server installation to avoid conflicts. To do this:
-
Search your WebLogic installation for the following files:
jaxb-api-<ver>.jarjaxb-impl-<ver>.jarserializer-<ver>.jarstax-api-<ver>.jarxalan-<ver>.jarxercesImpl-<ver>.jarxml-apis-<ver>.jar -
Change to the JasperReports Server WEB-INF/lib directory:
cd <js-install>/jasperserver-pro/WEB-INF/lib -
Delete any conflicting JARs.
-
-
Replace the default web.xml file with the following commands:
-
Update your Hibernate, Quartz, and Mail Server configuration:
-
The buildomatic logic has already configured the
hibernate.propertiesandjs.quartz.propertiesfiles for your database type. So you can copy these files to thejasperserver-profile as shown below.Copy from:
<js-install>/buildomatic/build_conf/default/webapp/WEB-INF/classes/hibernate.properties<js-install>/buildomatic/build_conf/default/webapp/WEB-INF/js.quartz.propertiesTo:
jasperserver-pro/WEB-INF/classes -
Edit the scheduler URI port value for WebLogic in the
js.quartz.properties:Edit
js.quartz.properties:Set:
report.scheduler.web.deployment.uri=http://localhost:8080/jasperserver-proTo:
report.scheduler.web.deployment.uri=http://localhost:7001/jasperserver-pro -
If you want to configure JasperReports Server to automatically schedule and email reports, enter your mail server information in the
js.quartz.propertiesfile. Modify allreport.scheduler.mail.sender.*properties as necessary for your mail server.Copy the
../buildomatic/keystore.init.propertiesfile to the../WEB-INF/classesdirectory.Also for WebLogic (for DB2, Oracle, and SQL Server):
progressiveStreaming=2needs to be added to the variables.For more information on the progressiveStreaming variable, refer to the section "BeanDefinitionStoreException with DB2" with Vendor's Driver in Database-related Problems.
-
-
If your mail server requires authentication, edit the
applicationContext-report-scheduling.xmlfile:- Open the
jasperserver-pro/WEB-INF/applicationContext-report-scheduling.xmlfile for editing and locate thereportSchedulerMailSenderbean. - Set the
javaMailProperties key="mail.smtp.auth" value totrue.
- Open the
-
Now you can change to the
jasperserver-profolder and re-archive thejasperserver-pro.warfile, using commands such as the following.Commands
Description
cd ../..Changes to the jasperserver-pro folder
mv ../jasperserver-pro.war ../BAK-jasperserver-pro.warRenames the original jasperserver-pro.war file.
"%JAVA_HOME%/bin/jar" cvf ../jasperserver-pro.war *Re-archives the jasperserver-pro.war file.
cd ..mv jasperserver-pro BAK-jasperserver-proRenames the unneeded working folder to a backup location.
Note
You now have a
jasperserver-pro.warfile that you can use for deploying to WebLogic. -
Edit your WebLogic domain configuration file
<wl-domain>/config/config.xml:Note
<wl-domain> is the path of the domain within WebLogic that contains your JasperReports Server deployment. For example,
<weblogic>/samples/domains/wl_server.-
Locate the
serverandsecurity-configurationelements, and insert the following parameters: -
Check that the
stuck-thread-max-timeelement appears above thelisten-addresselement before the closing</server>tag.Note
In some cases, setting the
stuck-thread-max-timemay cause a schema validation error. Then, you can try removing this line from the configuration file.
-
-
Set JVM options as described in Setting Java Properties.
Deploy JasperReports Server to WebLogic:
-
Enable the Lock & Edit button:
- Select the Preferences link at the top of the Admin console.
- Scroll to the bottom of the User Preferences screen and deselect Automatically Acquire Lock and Activate Changes.
- Save.
-
In the Administrative Console, click the Lock & Edit button and navigate to Deployments.
-
On the Deployments page, click the Install button.
-
Select the path to
<js-install>. Click Next. -
Leave the radio button selected for Install this deployment as an application. Click Next.
-
When prompted, enter the following parameter values:
Parameter Name Example Value Name jasperserver-proSecurity Custom Roles and Policies Source accessibility Use the defaults defined by the deployment's targets -
Review your choices and click Finish.
-
Click Save.