To meet prerequisites for installing the WAR file for WebLogic:
1. | Check that the Oracle/Sun Java JDK 1.6 or 1.7 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. |
4. | If you are using one of the following commercial databases: Oracle, SQL Server, or DB2, you will need to download a JDBC driver before beginning the installation steps. |
Download locations are the following:
• | http://www.oracle.com/technetwork/indexes/downloads (Oracle) |
• | http://www.microsoft.com/en-us/download/details.aspx?id=11774 (SQL Server) |
• | http://www-01.ibm.com/software/data/db2/linux-unix-windows/downloads.html (DB2) |
The downloaded JDBC jar should be copied into the following location:
• | <js-install>/buildomatic/conf_source/db/<dbType>/jdbc |
For instance, for Oracle the driver would go here:
• | <js-install>/buildomatic/conf_source/db/oracle/jdbc |
See Download a JDBC Driver Jar for more information.
To install the WAR file for WebLogic:
1. | Extract all files in jasperreports-server-5.6-bin.zip. Choose a top-level directory, such as C:Jaspersoft on Windows or /home/<user> on Linux, for the extracted files. |
Unpacking the ZIP file creates the directory jasperreports-server-5.6-bin.
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 Setting JVM Options for Application Servers. After setting up the database manually, skip step 5 through step 8, and proceed to step 10.
3. | (If you are using Oracle or MySQL, you can skip this step.) Copy your JDBC driver to WebLogic and set your classpath. For example, for PostgreSQL: |
a. | Copy the JDBC jar from |
<js-install>/buildomatic/conf_source/db/postgresql/jdbc
to
<weblogic_home>/server/lib
b. | Add the following line to your <weblogic_home>/bin/setDomainEnv.cmd/sh file as follows: |
c. | Save the file. |
d. | Restart WebLogic using the startWebLogic.cmd/sh. |
Note that the Oracle and MySQL JDBC drivers are included in recent versions of WebLogic by default.
4. | If you are using Oracle, copy the database driver jar into the directory: |
.../Oracle/Middleware/user_projects/domains/<user defined domain>/lib
5. | Copy the .properties file for your database: |
• | From — <js-install>/buildomatic/sample_conf/ |
• | To — <js-install>/buildomatic |
6. | Rename the file you copied to default_master.properties file. |
7. | Edit the default_master.properties file to add the settings that are specific to your database and your application server. “Sample Values for the default_master.properties File” shown example property settings. |
When appServerType = skipAppServerCheck, buildomatic skips the application servertype validation. Use this setting when installing JasperReports Server with WebLogic. Backslashes in appServerDir must be doubled, for example c:WLApplication_Server. Make sure there are no spaces in the appServerDir path. |
Sample Values for the default_master.properties File
Database
Sample Property Values
PostgreSQL
DB2
For DB2 8.x, change your deployed JDBC driver as described in Locating and Changing Buildomatic Configuration Files.
MySQL
Oracle
SQL Server
If your application server runs on Java 1.5, change your deployed JDBC driver as described in Locating and Changing Buildomatic Configuration Files.
8. | Setup the database and optional sample databases using the buildomatic Ant scripts. Enter commands in the following table 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>
Commands | Description |
cd <js-install>/buildomatic | Goes to the buildomatic directory. |
js-ant create-js-db | Create 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 |
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. |
9. | Add the database driver to your classpath. |
10. | In WebLogic, open an Administrative Console window, and navigate to Services > Data Sources or Domain Configurations > Services > Data Sources. |
11. | 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. |
To use a database other than PostgreSQL, configure the database connections using settings shown in Configuring Other Database Connections. If you plan on using the sample databases (Foodmart and Sugar CRM), perform this step and the following step for each database. |
Parameter Name | JasperReports Server | Foodmart Example | Sugar CRM Example |
---|---|---|---|
Name | JasperServerDataBase | FoodmartDataBase | SugarcrmDataBase |
JNDI Name | JasperServerDataBase | FoodmartDataBase | SugarcrmDataBase |
Database Type | PostgreSQL | ||
Database Driver | PostgreSQL Driver Versions: using org.postgresql.Driver | ||
Supports Global | Selected | ||
One-Phase Commit | Selected |
12. | Set connection properties. Sample properties for a PostgreSQL database are: |
Parameter Name | JasperReports Server | Foodmart Example | Sugar CRM Example |
---|---|---|---|
Database Name | jasperserver | foodmart | sugar crm |
Host Name | localhost | ||
Port | 5432 | ||
Database User Name | postgres | ||
Password | postgres | ||
Confirm Password | postgres |
13. | 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 jasperserver database to: |
jdbc:postgresql://localhost:5432/jasperserver
14. | Select targets, and ensure that AdminServer is set for all data sources. |
15. | Using the Java jar tool or an unzip tool, unpack the jasperserver-pro.war file. For example, enter these commands to use the Java jar tool: |
cd <js-install-dir>mkdir jasperserver-procd jasperserver-pro"%JAVA_HOME%/bin/jar" xvf ../jasperserver-pro.war[/code] |
The jasperserver-pro.war file is unpacked to a folder.
16. | If you are using WebLogic 10.3.5, you need to delete the following JARs to avoid conflict with WebLogic JARs. If you are using WebLogic 10.3.6 or WebLogic 12c, skip this step. To delete the JARs: |
a. | Go to the WEB-INF/lib directory: |
cd jasperserver-pro/WEB-INF/lib
b. | Delete the following conflicting JARs, but save a copy of them to a temporary location: |
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
If you experience a problem with OLAP Views, you need these JARs for the workaround described in Troubleshooting Problems with OLAP Views.
17. | If you are using WebLogic 10.3.6, you need to replace xml-apis-1.3.04.jar with xml-apis-2.10.0.jar. If you are using WebLogic 10.3.5 or WebLogic 12c, skip this step. To update the JAR: |
a. | Go to the WEB-INF/lib directory. |
b. | Copy xml-apis-2.10.0.jar from <js-install>/buildomatic/install_resources/extra-jars |
c. | Remove xml-apis-1.3.04.jar. |
18. | Update your Hibernate, Quartz, and Mail Server configuration: |
a. | The hibernate.properties and js.quartz.properties files have been already configured for your database type by the buildomatic logic. So, these pre-configured files can be copied to the jasperserver-pro file: |
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. |
19. | If your mail server requires authentication, edit the applicationContext-report-scheduling.xml file in the same manner: |
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. |
20. | Now you can change to the jasperserver-pro folder and rearchive 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 * | Rearchives 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 that can be used for deploying to WebLogic. |
21. | 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: |
b. | Check that the stuck-thread-max-time element appears above the listen-address element before the closing </server> tag. |
22. | Copy the file <js-install>/buildomatic/conf_source/iePro/lib/xercesImpl-2.10.0.jar to the folder <wl-domain>/lib. |
23. | Edit the setdomainEnv file to force WebLogic to use the correct version of the Joda time library, which is shipped with JasperReports Server. By default, the Joda time library is in: |
<js-install>/buildomatic/conf_source/iePro/lib.
• | Windows: Edit the setDomainEnv.bat file and add the following line: |
set PATCH_CLASSPATH=${PATH TO NEW JODA LIBRARY}joda-time-2.1.jar
• | Linux: Edit the setDomainEnv.sh file and add the following line: |
export PATCH_CLASSPATH=${PATH TO NEW JODA LIBRARY}/joda-time-2.1.jar
24. | 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. | On the User Preferences screen, scroll to the bottom of the 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.