Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
BIRT/WebSphere Deployment
Contents
BIRT WebSphere 5.1 Deployment
This entry explains how to deploy the WebViewerExample contained in the BIRT 2.1.1 runtime as an ear file using WebSphere Application Server, Version 5.1.1.9.
Modify the birt.war file from the BIRT 2.1.1 runtime
- Download the BIRT 2.1.1 runtime
- Unzip the birt-runtime-2_1_1.zip file.
- The birt.war file will appear in the directory you just unzipped the zip file to.
- Expand the birt.war file.
- For example, jar -xvf birt.war.
- first create a logs directory with an empty file in it so that when the ear is deployed the logs directory will not be ignored
- mkdir \birt-runtime\logs
- touch \birt-runtime\logs\dummy
- The emf jar files need to be removed from the WEB-INF/platform/plugins directory and one emf jar file needs to be added to the WEB-INF/lib directory.
- cd \birt-runtime\WEB-INF\platform\plugins
- mv org.eclipse.emf_2.2.0.v200606051102.jar ../../lib/.
- Now delete the emf jar files from the WEB-INF/platform/plugins directory.
- rm org.eclipse.emf*.jar
- Now the birt.war file is ready to be remade again. Go to the directory where you unzipped the birt-runtime zip file and issue this command to recreate the birt.war file;
- jar -cvf birt.war WEB-INF/* index.jsp logs report/* scriptlib/* test.rptdesign test1.rptdesign webcontent/*
- Next, to deploy the application in WebSphere we need to create an ear file which contains an application.xml file, an example is shown at the end of this page.
- In the same directory where the birt.war file is create a META-INF directory and in this directory create the application.xml file shown below.
- Now create the ear file which will be deployed to WAS 5.1.1.9;
- cd \birt-runtime\
- jar -cvf birtTestEAR.ear META-INF/* birt.war
Deploying the ear file to WebSphere
- Start the WebSphere application server if it is not already running and bring up the Administrative Console.
- From the left hand frame select Applications >> Install New Application
- Browse to the Ear file (in this case birtTestEAR.ear), leave Context Root blank, then Next
- For the page called "You can choose to generate default bindings and mappings", leave everything set to the default and choose "Next"
- Step 1. Provide options to perform the installation, click "Next"
- Step 2. Click the checkbox next to the name of the Web Module (in this case Eclipse BIRT Report Viewer), then "Next"
- Step 3. Click the checkbox next to the Module name, in this case Eclipse BIRT Report Viewer, then "Next"
- Step 4. Summary, Click "Finish"
- Then you'll see a progress screen "Installing".
- If all goes well it will say "Application birtTestEAR installed successfully".
- Click the "Manage Applications" link.
- Find the name of your applicaton from the Enterprise Applications list, and click the name of it, which is a hyperlink.
- Now you will see two tabs for the enterprise application. On the Configuration tab change the Classloader Mode to PARENT_LAST and the "WAR Classloader Policy" to "Application." Then Click "Apply".
- Now scroll down the page to the "Related Items" section. Click the "Web Modules" link.
- This brings up the Web Module page. Click the name of the uri, in this case birt.war. The configuration tab comes up. Change the Classloader Mode to PARENT_LAST.
- Click Apply.
- Now you are done making changes. Click the 'Save' link at the top of the page.
- A Save screen comes up, click the Save button at the bottom of the page under the 'Save to Master Configuration' area.
- Now in the left frame click the Applications + and select Enterprise Applications again.
- Select the ear you just installed by clicking the check box next to it, and click the Start button.
- Now go to the URL where it is deployed, something like http://<myservername>:7080/birtTest/index.jsp
- If you are using WebSphere Express 7080 is the port for the http server.
The BIRT Web Viewer example should run successfully. If it does not check in the WebSphere application server logs. For instance under
C:\Program Files\IBM\WebSphere\Express51\AppServer\logs\server1
and under
C:\Program Files\IBM\WebSphere\Express51\AppServer\installedApps\blah\birtEAR.ear\birt.war\logs
Example application.xml for WAS 5.1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> <application id="Application_ID"> <display-name>birtTestEAR</display-name> <module id="WebModule_10"> <web> <web-uri>birt.war</web-uri> <context-root>birtTest</context-root> </web> </module> </application>
BIRT WebSphere 6.0.1 Deployment
This entry explains how to deploy the WebViewerExample contained in the BIRT 2.1.1 runtime as an ear file using WebSphere Application Server, Version 6.0.1.0.
Modify the birt.war file from the BIRT 2.1.1 runtime
- Download the BIRT 2.1.1 runtime
- Download itext-1.3.jar from the links provided on the BIRT installation page http://www.eclipse.org/birt/phoenix/build/
- Unzip the birt-runtime-2_1_1.zip file.
- The birt.war file will appear in the directory you just unzipped the zip file to.
- Expand the birt.war file.
- For example, jar -xvf birt.war.
- first create a logs directory with an empty file in it so that when the ear is deployed the logs directory will not be ignored
- mkdir \birt-runtime\logs
- touch \birt-runtime\logs\dummy
- Under the WEB-INF/platform/plugins/com.lowagie.itext/ directory created after expanding birt.war create a lib directory. Copy itext-1.3.jar file to this directory.
- Now the birt.war file is ready to be remade again. Go to the directory where you unzipped the birt-runtime zip file and issue this command to recreate the birt.war file;
- jar -cvf birt.war WEB-INF/* index.jsp logs report/* scriptlib/* test.rptdesign test1.rptdesign webcontent/*
- Next, to deploy the application in WebSphere we need to create an ear file which contains an application.xml file, an example is shown at the end of this page.
- In the same directory where the birt.war file is create a META-INF directory and in this directory create the application.xml file shown below.
- Now create the ear file which will be deployed to WAS 6.0.1.0;
- cd \birt-runtime\
- jar -cvf birtTestEAR.ear META-INF/* birt.war
Deploying the ear file to WebSphere 6.0.1
- Deploy the birtEAR.ear file to WAS 6.0.1 with the following additional steps from a generic deployment:
- The 'Class loader mode' for the ear should be 'Parent Last'. Also, I set the WAR class loader policy to 'Application' although this may be optional.
- The Web module, birt.war 'Class loader mode' must also be set to Parent Last.
Example application.xml for WAS 6.0.1
<?xml version="1.0" encoding="UTF-8"?> <application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"> <display-name> birtEAR</display-name> <module id="WebModule_1154462768328"> <web> <web-uri>birt.war</web-uri> <context-root>birt</context-root> </web> </module> </application>