Procedure for Installing the WAR File for WebLogic
To meet prerequisites for installing the WAR file for WebLogic
1. | Check that a supported version of the Oracle/Sun Java JDK is installed. |
2. | Check that the JAVA_HOME system environment variable points to the JDK. |
3. | Install the PostgreSQL, MySQL, Oracle, SQL Server, or DB2 database. |
|
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
1. | Extract all files in js-jrs_9.0.0_bin.zip into a top-level directory, such as C:\Jaspersoft on Windows or /home/<user> on Linux. |
Unpacking the ZIP file creates the directory js-jrs_
2. | 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.
3. | (If you are using MySQL, you can skip this step.) Copy your JDBC driver to WebLogic. PostgreSQL Example: |
a. | Copy the JDBC jar: From: |
<js-install>/buildomatic/conf_source/db/postgresql/jdbc
To:
<weblogic_home>/server/lib
Note that the MySQL JDBC driver is included in recent versions of WebLogic.
4. | 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 |
5. | Restart WebLogic using the startWebLogic.cmd/sh . |
6. | Copy the .properties file for your database: |
From — <js-install>/buildomatic/sample_conf/
To — <js-install>/buildomatic
7. | Rename the file you copied to default_master.properties file. |
8. | 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. |
|
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. |
Database |
Sample Property Values |
PostgreSQL |
appServerType=skipAppServerCheck
appServerDir=[path to WebLogic application server]
dbUsername=postgres
dbPassword=postgres
dbHost=localhost
|
DB2 |
appServerType=skipAppServerCheck
appServerDir=[path to WebLogic application server]
dbUsername=db2inst1
dbPassword=password
dbHost=localhost
|
MySQL |
appServerType=skipAppServerCheck
appServerDir=[path to WebLogic application server]
dbUsername=root
dbPassword=password
dbHost=localhost
|
Oracle |
appServerType=skipAppServerCheck
appServerDir=[path to WebLogic application server]
sysUsername=system
sysPassword=password
dbUsername=jasperserver
dbPassword=password
dbHost=hostname
Note that |
SQL Server |
appServerType=skipAppServerCheck
appServerDir=[path to WebLogic application server]
dbUsername=sa
dbPassword=sa
dbHost=localhost
|
default_master.properties
file as described in Additional Buildomatic Configuration for Split Installation Upgrade.
default_master.properties
file as described in Installation Types.
9. | Set up the database and optional sample databases using the buildomatic Ant scripts. Enter commands in the table below to call buildomatic Ant scripts: |
|
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>
Commands |
Description |
|
Goes to the buildomatic directory. |
js-ant create-js-db
|
Creates the jasperserver repository database. |
|
Initializes database, loads core application data. |
|
(Optional) Creates sample databases. |
|
(Optional) Loads sample data into the sample databases. |
|
(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. |
|
On non-Linux Unix platforms, the js-ant commands may not be compatible with all shells. If you have errors, use the |
|
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. |
10. | Add the database driver location to the WebLogic classpath in the following file: |
<weblogic_home>/domains/<user_domain>/bin/setDomainEnv.sh
Use 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 |
11. | In WebLogic, open an Administrative Console window and navigate to Services > Data Sources or Domain Configurations > Services > Data Sources. |
12. | 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'll need to click Next after entering the database driver and after One-Phase Commit. |
|
To use a database other than PostgreSQL, configure the database connections using settings shown in Configuring Databases Drivers. 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 |
Selected |
|||||
One-Phase Commit |
Selected |
13. | 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: jsaudit |
foodmart |
sugarcrm |
Host Name |
localhost |
|||
Port |
5432 |
|||
Database User Name |
postgres |
|||
Password |
postgres |
|||
Confirm Password |
postgres |
14. | Test the database connection: |
a. | For SugarCRM and Foodmart, use the default connections: |
jdbc:postgresql://localhost:5432/sugarcrm
jdbc:postgresql://localhost:5432/foodmart
b. | Change the URL for the JasperServerDataBase to: |
jdbc:postgresql://localhost:5432/jasperserver
c. | Change the URL for the AuditDataBase to: |
For Compact installation: jdbc:postgresql://localhost:5432/jasperserver
For Split installation: jdbc:postgresql://localhost:5432/jsaudit
d. | Change the URL for the JasperServerSystemDataBase to: |
jdbc:postgresql://localhost:5432/jasperserver
e. | Change the URL for the AuditAnalyticsDataBase to: |
For Compact installation: jdbc:postgresql://localhost:5432/jasperserver
For Split installation: jdbc:postgresql://localhost:5432/jsaudit
15. | Select targets and ensure that AdminServer is set for all data sources. |
16. | In WebLogic, open an Administrative Console window and navigate to Services > Data Sources or Domain Configurations > Services > Data Sources |
17. | Select each created data source (JasperServerDataBase, AuditDataBase, FoodmartDataBase, and SugarcrmDataBase) |
18. | 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. |
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 |
20. | Click Save. |
21. | 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: |
cd <js-install-dir> mkdir jasperserver-pro cd jasperserver-pro "%JAVA_HOME%/bin/jar" xvf ../jasperserver-pro.war
22. | 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: |
a. | Search your WebLogic installation for the following files: |
jaxb-api-<ver>.jar
jaxb-impl-<ver>.jar
serializer-<ver>.jar
stax-api-<ver>.jar
xalan-<ver>.jar
xercesImpl-<ver>.jar
xml-apis-<ver>.jar
b. | Change to the JasperReports Server WEB-INF/lib directory: |
cd <js-install>/jasperserver-pro/WEB-INF/lib
c. | Delete any conflicting JARs. |
23. | Replace the default web.xml file with the following commands: |
cd <js-install-dir>/jasperserver-pro/WEB-INF mv ./web-version24.xml ./web.xml
24. | Update your Hibernate, Quartz, and Mail Server configuration: |
a. | The buildomatic logic has already configured the hibernate.properties and js.quartz.properties files for your database type. So you can copy these files to the jasperserver-pro file 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.properties
To:
jasperserver-pro/WEB-INF/classes
b. | 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-pro
To:
report.scheduler.web.deployment.uri=http://localhost:7001/jasperserver-pro
c. | If you want to configure JasperReports Server to automatically schedule and email reports, enter your mail server information in the js.quartz.properties file. Modify all report.scheduler.mail.sender.* properties as necessary for your mail server. |
Copy the ../buildomatic/keystore.init.properties
file to the ../WEB-INF/classes directory.
Also for WebLogic (for DB2, Oracle, and SQL Server):
progressiveStreaming=2
needs 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.
25. | If your mail server requires authentication, edit the applicationContext-report-scheduling.xml file: |
a. | Open the jasperserver-pro/WEB-INF/applicationContext-report-scheduling.xml file for editing and locate the reportSchedulerMailSender bean. |
b. | Set the javaMailProperties key= "mail.smtp.auth " value to true . |
26. | Now you can change to the jasperserver-pro folder and re-archive the jasperserver-pro.war file, using commands such as the following. |
Commands |
Description |
|
Changes to the jasperserver-pro folder |
|
Renames the original jasperserver-pro.war file. |
|
Re-archives the jasperserver-pro.war file. |
|
Renames the unneeded working folder to a backup location. |
|
You now have a |
27. | Edit your WebLogic domain configuration file <wl-domain>/config/config.xml : |
|
<wl-domain> is the path of the domain within WebLogic that contains your JasperReports Server deployment. For example |
a. | Locate the server and security-configuration elements, and insert the following parameters: |
<server> ... <stuck-thread-max-time>1200</stuck-thread-max-time> <listen-address></listen-address> </server> <security-configuration> ... <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials> </security-configuration>
b. | Check that the stuck-thread-max-time element appears above the listen-address element before the closing </server> tag. |
|
In some cases, setting the |
28. | Set JVM options as described in Setting Java Properties. |
Deploy JasperReports Server to WebLogic
1. | Enable the Lock & Edit button: |
a. | Select the Preferences link at the top of the Admin console |
b. | Scroll to the bottom of the User Preferences screen and deselect Automatically Acquire Lock and Activate Changes. |
c. | Save. |
2. | In the Administrative Console, click the Lock & Edit button and navigate to Deployments. |
3. | On the Deployments page click the Install button. |
4. | Select the path to <js-install> . Click Next. |
5. | Leave the radio button selected for Install this deployment as an application. Click Next. |
6. | When prompted, enter the following parameter values: |
Parameter Name |
Example Value |
Name |
jasperserver-pro |
Security |
Custom Roles and Policies |
Source accessibility |
Use the defaults defined by the deployment's targets |
7. | Review your choices and click Finish. |
8. | Click Save. |
Recommended Comments
There are no comments to display.