BIRT and GlassFish b41

The BIRT project includes a web application for displaying reports. After some fits and starts, folks have been able to get it working on GlassFish. While folks were able to get it working, I did not like the "solution". I spent a bit of time with BIRT 2.0.1 and build 41 to see if I could get a better solution.

I have been able to deploy 2.0.1 on GlassFish build 41, by following the instructions for JBoss, with a couple small changes:

  • I used the asadmin deploydir command, instead of copying files to a deploy directory. GlassFish has an autodeploy directory, but it expects archives to be placed there, not "exploded" archives.
  • I did not need to copy the files from Axis 1.2.1, listed in the instructions. It looks like the files are already there in the 2.0.1 release.
  • I created a <BIRT-ROOT>/WEB-INF/sun-web.xml file. It looked like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
    <sun-web-app error-url="">
      <context-root>/birt-viewer</context-root>
      <class-loader delegate="false"/>
      <jsp-config>
        <property name="classdebuginfo" value="true">
          <description>Enable debug info compilation in the generated servlet class</description>
        </property>
        <property name="mappedfile" value="true">
          <description>Maintain a one-to-one correspondence between static content and the generated servlet class' java code</description>
        </property>
      </jsp-config>
    </sun-web-app>
    
  • I did need to copy commons-logging-1.0.4.jar from Axis 1.2.1, into <BIRT-ROOT>/WEB-INF/lib.
  • I had to copy the derby.jar from <BIRT-ROOT>/plugins/org.eclipse.birt.report.data.oda.jdbc to <BIRT-ROOT>/WEB-INF/lib

After doing this, I was able to view the "installation report" and the "more complex report".

Comments:

Thanks for posting this Vince. Just wanted to add that you will still need to add the prototype.js to <BIRT-ROOT>/axis/lib/ to enable the Ajax function in the BIRT Viewer. In addition, the iText.jar file needs to be copied to the <BIRT-ROOT>/plugins/org.eclipse.birt.report.engine.emitter.pdf/lib directory to enable viewing your report as pdf. Not being able to distribute these files as part of our binary build has been a bit trying, but we need to keep the EPL clean, and we are having a hard time getting these two files to clear the release process Scott Rosenbaum BIRT PMC

Posted by Scott Rosenbaum on March 25, 2006 at 01:50 PM PST #

Glad to help. Sorry I wasn't able to get to this before EclipseCon... I could have brought some water... ;) regarding release processes.... I hear you.

Posted by vince kraemer on March 25, 2006 at 02:01 PM PST #

Hi Vince,
Thank you for keep going in this direction.
I have filed bug regarding issue with Deby server.
Here is comments from the Birt team:
------- Comment #1 From Gary Xue 2006-03-17 18:22 [reply] ------- Due to the inherent limitations of Derby embedded DB engine (each JVM can only have one instance of the DB engine), using BIRT SampleDB within another application which also packages Derby is problematic. The immediate issue is the possible Derby version conflict which is the direct cause of the reported problem. A upgrade of BIRT Derby library version is not a permanent solution. Also, if another Derby embedded DB instance is started, it may affect the operation of the SampleDB plugin. For BIRT 2.1, we will consider upgrading the packaged Derby Engine version, which hopefully will alleviate this issue (at least for the time being). We will research into how we can resolve this issue permanently in future releases. ---------------------------------------------
If you will have some suggestions click on:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=132017

Posted by Vladimir Perlov on March 26, 2006 at 11:33 PM PST #

Thanks for filing the issue with the Eclipse Foundation regarding BIRT. I have sent Gary some more info about this improved work-around.

Thank you for bringing this app to our attention.

Posted by vince kraemer on March 28, 2006 at 05:23 AM PST #

Post a Comment:
Comments are closed for this entry.
About


Vince Kraemer writes the entries in this blog.

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today
News
Blogroll

No bookmarks in folder

automarks