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, TIBCO has verified MySQL using the MariaDB driver if you do not want to use TIBCO's MySQL driver. |
To install the WAR file for WebLogic:
1. | Extract all files in TIB_js-jrs_8.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 TIB_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're using MySQL, you can skip this step.) Copy your JDBC driver to WebLogic. |
a. | PostgreSQL example: Copy the JDBC jar from |
<js-install>/buildomatic/conf_source/db/postgresql/jdbc
to
<weblogic_home>/server/lib
b. | TIBCO JDBC Oracle driver example: Copy the following two jars |
<js-install>/buildomatic/conf_source/db/oracle/jdbc/TIoracle-X.X.jar
and
<js-install>/buildomatic/install_resources/extra-jars/jswlstc-1.0.jar
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\ or <js-install>\buildomatic\conf_source\db\<your_database>\native.jdbc\ |
to: |
<js-install>\buildomatic\conf_source\iePro\lib |
a. | Open the file <weblogic_home>/server/lib/jdbcdrivers.xml in a text editor. |
b. | Add the correct settings for your database. The following example shows the settings for the TIBCO JDBC driver for Oracle. For DB2 or SQL Server, see Configuring TIBCO JDBC Driver Connections. |
<Driver Database="Oracle" Vendor="Tibco" Type="Thin" DatabaseVersion="10g and later" ForXA="false" Cert="false" ClassName="tibcosoftware.jdbc.oracle.OracleDriver" URLHelperClassname="weblogic.jdbc.utils.OracleJDBC4DriverURLHelper$SIDHelper" Description="tibco driver for Oracle"> <Attribute Name="DbmsName" Required="true" InURL="true"/> <Attribute Name="DbmsHost" Required="true" InURL="true"/> <Attribute Name="DbmsPort" Required="true" InURL="true" DefaultValue="1521"/> <Attribute Name="DbmsUsername" Required="true" InURL="false"/> <Attribute Name="DbmsPassword" Required="true" InURL="false"/> </Driver> |
c. | Save the file. |
d. | 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 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 dbUsername must be the same as the Oracle user name. |
SQL Server |
appServerType=skipAppServerCheck appServerDir=[path to WebLogic application server] dbUsername=sa dbPassword=sa dbHost=localhost |
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 3 in DB2, then go to the next step (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 Execute
Commands |
Description |
cd <js-install>/buildomatic |
Goes to the buildomatic directory. |
js-ant create-js-db | Creates the jasperserver repository database |
js-ant init-js-db-pro js-ant import-minimal-pro |
Initializes database, loads core application data |
js-ant create-sugarcrm-db js-ant create-foodmart-db |
(Optional) Creates sample databases |
js-ant load-sugarcrm-db js-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. |
|
On non-Linux Unix platforms, the js-ant commands may not be compatible with all shells. If you have errors, use the bash shell explicitly. For more information, see Bash Shell for Solaris, IBM AIX, HP UX and FreeBSD. |
|
Installing JasperReports Server automatically generates encryption keys that reside on the file system. These keys are stored in a dedicated TIBCO Jaspersoft keystore. Make sure this keystore is properly secured and backed up, as described in the TIBCO 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 TIBCO JDBC Driver Connections or 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 | Foodmart | Sugar CRM |
---|---|---|---|---|
Name |
JasperServerDataBase |
AuditDataBase |
FoodmartDataBase |
SugarcrmDataBase |
JNDI Name |
JasperServerDataBase |
AuditDataBase |
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
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, 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 | Foodmart | Sugar CRM |
---|---|---|---|---|
Name |
JasperServerDataBase |
AuditDataBase |
FoodmartDataBase |
SugarcrmDataBase |
Test Table Name |
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/hibernate.properties
<js-install>/buildomatic/build_conf/default/webapp/WEB-INF/js.quartz.properties
To:
jasperserver-pro/WEB-INF
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. |
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 |
cd ../.. |
Changes to the jasperserver-pro folder |
mv ../jasperserver-pro.war ../BAK-jasperserver-pro.war |
Renames 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-pro |
Renames the unneeded working folder to a backup location. |
|
You now have a jasperserver-pro.war file you can use for deploying to WebLogic. |
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 <weblogic>/samples/domains/wl_server. |
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 stuck-thread-max-time may cause a schema validation error. In this case, you can try removing this line from the configuration file. |
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. |