Jump to: navigation, search

BIRT/WebSphere Deployment

Revision as of 18:37, 30 November 2006 by Stanleyg.us.ibm.com (Talk | contribs)

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

Modify the birt.war file from the BIRT 2.1.1 runtime

  1. Download the BIRT 2.1.1 runtime
  2. Unzip the birt-runtime-2_1_1.zip file.
    1. The birt.war file will appear in the directory you just unzipped the zip file to.
  3. Expand the birt.war file.
    1. For example, jar -xvf birt.war.
  4. 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
    1. mkdir \birt-runtime\logs
    2. touch \birt-runtime\logs\dummy
  5. 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.
    1. cd \birt-runtime\WEB-INF\platform\plugins
    2. mv org.eclipse.emf_2.2.0.v200606051102.jar ../../lib/.
  6. Now delete the emf jar files from the WEB-INF/platform/plugins directory.
    1. rm org.eclipse.emf*.jar
  7. 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;
    1. jar -cvf birt.war WEB-INF/* index.jsp logs report/* scriptlib/* test.rptdesign test1.rptdesign webcontent/*
  8. 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.
    1. 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.
  9. Now create the ear file which will be deployed to WAS;
    1. cd \birt-runtime\
    2. jar -cvf birtTestEAR.ear META-INF/* birt.war

Deploying the ear file to WebSphere

  1. Start the WebSphere application server if it is not already running and bring up the Administrative Console.
  2. From the left hand frame select Applications >> Install New Application
  3. Browse to the Ear file (in this case birtTestEAR.ear), leave Context Root blank, then Next
  4. For the page called "You can choose to generate default bindings and mappings", leave everything set to the default and choose "Next"
  5. Step 1. Provide options to perform the installation, click "Next"
  6. Step 2. Click the checkbox next to the name of the Web Module (in this case Eclipse BIRT Report Viewer), then "Next"
  7. Step 3. Click the checkbox next to the Module name, in this case Eclipse BIRT Report Viewer, then "Next"
  8. Step 4. Summary, Click "Finish"
    1. Then you'll see a progress screen "Installing".
    2. If all goes well it will say "Application birtTestEAR installed successfully".
  9. Click the "Manage Applications" link.
  10. Find the name of your applicaton from the Enterprise Applications list, and click the name of it, which is a hyperlink.
    1. 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".
  11. Now scroll down the page to the "Related Items" section. Click the "Web Modules" link.
    1. 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.
    2. Click Apply.
    3. Now you are done making changes. Click the 'Save' link at the top of the page.
  12. A Save screen comes up, click the Save button at the bottom of the page under the 'Save to Master Configuration' area.
  13. Now in the left frame click the Applications + and select Enterprise Applications again.
  14. Select the ear you just installed by clicking the check box next to it, and click the Start button.
  15. Now go to the URL where it is deployed, something like http://<myservername>:7080/birtTest/index.jsp
    1. 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

<?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">
      <module id="WebModule_10">