Monday, June 25, 2007

Images are not Visible in the BIRT WebViewer on Weblogic, Websphere

I came across a problem where the images in BIRT reports were not visible. Go through the Checklist below:

  • Are you using the BIRT Web Viewer to see the rendered BIRT reports?
  • Are you viewing rptdesign or rptdocuments?
  • The BIRT report is seen correctly when BIRT Web Viewer is deployed on Tomcat, JBoss, WebSphere 6.1 (i.e. images are visible). The temporary directory used to store images is present in the extracted WAR on these servers.
  • Whereas images for in the same report are not visible when the same BIRT WebViewer is deployed on WebLogic or WebSphere 5.1. The temporary directory used to store images is not present in the extracted WAR on these servers.
  • Log contains the message:
org.eclipse.birt.report.engine.api.HTMLServerImageHandler handleImage
SEVERE: imageURL or ImageDIR is not set!

GOOD NEWS: This is a known issue with the BIRT WebViewer 2.1.x. The BIRT bug id is 169873. It has been observed on WebLogic 9.1, 9.2 and WebSphere 5.1. The fix is already available in the latest BIRT build 2.2 RC3. The Final BIRT 2.2 release is expected by end of June 2007.

Check the details here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=169873
http://dev.eclipse.org/newslists/news.eclipse.birt/msg15609.html

I had verified that installing BIRT Web-Viewer 2.2RC3 fixes the problem for WebLogic on Windows and Solaris. Some other people claim that it fixes for WebSphere as well. The images in rptdesign, rptdocument files are correctly visible in the browser. So the fix by BIRT team (for 169873) indeed solves the problem.

BAD NEWS: If you do not wish to upgrade to the BIRT WebViewer 2.2, I am afraid there is no easy fix which will solve your problem. People (including myself!!) have tried a number of tricks in vain. The only way out is probably to handle the temporary images by yourself, write a new Servlet to stream those images and change the report rendering code to have the images point to the new Servlet.

No comments: