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 22.214.171.124.
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.
- 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 126.96.36.199;
- 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.
<?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>