Community
Participate
Working Groups
I have a report design that worked ok using the genReport scripts in 2.1.1. This does not work anymore using the genReport script on 2.2. It fails with a ClassNotFoundException in com.ibm.icu.text.SimpleDateFormat. The reason is because of this: In birt 2.1.1 - this class is in com.ibm.icu_3.4.4.1.jar In birt 2.2.0 - this class is in com.ibm.icu_3.4.5.jar The genReport.sh in birt 2.2 download does not set it to the correct version but instead points to the old one - com.ibm.icu_3.4.4.1.jar Thus the classpath is not set correctly and the error. I did an eclipse compare of the runtime downloads -- birt 2.1.1 and birt 2.2.0 and lots of jar versions have changed. Along with fixing this particular issue, it might be good to investigate if all the jars etc used in birt 2.2 runtime are correctly included in the classpath. ----------------- Also, I put the component as ReportEngine but maybe this is more of a documentation /scripts issue. Can someone please help me in figuring out which component it should go so I can assign it to the correct component.
I made a patch for 164697 issue and to run the scripts successfully, this issue needs to be fixed. I'll take a look at this issue and try to post a patch. Actually, even a blank rptdesign wont work with the current scripts. Here is the stack trace. C:\BIRT\birt-runtime-2_2_0\ReportEngine>genReport C:\BIRT\trunk2\samplesReport\blank.rptdesign C:\BIRT\birt-runtime-2_2_0\ReportEngine>ECHO off Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/icu/text/SimpleDateFormat at org.eclipse.birt.report.model.metadata.DateTimePropertyType.<clinit>(DateTimePropertyType.java:61) at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<init>(MetaDataDictionary.java:229) at org.eclipse.birt.report.model.metadata.MetaDataDictionary.<clinit>(MetaDataDictionary.java:107) at org.eclipse.birt.report.model.api.impl.DesignEngineImpl.newSessionHandle(DesignEngineImpl.java:122) at org.eclipse.birt.report.model.api.DesignEngine.newSessionHandle(DesignEngine.java:106) at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:146) at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:244) at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:192) at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:126) at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:225) at org.eclipse.birt.report.engine.api.ReportRunner.runAndRenderReport(ReportRunner.java:189) at org.eclipse.birt.report.engine.api.ReportRunner.execute(ReportRunner.java:162) at org.eclipse.birt.report.engine.api.ReportRunner.main(ReportRunner.java:118)
Created attachment 56501 [details] patched genReport.bat
Created attachment 56502 [details] Patched genReport.sh
In another bug 164697, Wenfeng Li suggested to attach the source file for the scripts. So I am attaching the source files (genReport.bat, genReport.sh) This patch fixes the following issues that were found in the script files in the birt 2.2 M2 runtime download. The BIRTCLASSPATH setting needs the following corrections: 1. %BIRT_HOME%/ReportEngine/flute.jar - Incorrect location for jar. Needs to be %BIRT_HOME%/ReportEngine/lib/flute.jar 2. com.ibm.icu_3.4.4.1.jar needs to be com.ibm.icu_3.4.5.jar 3. org.eclipse.emf.ecore_2.2.0.v200606051102.jar needs to be org.eclipse.emf.ecore_2.2.1.v200609210005.jar 4. org.eclipse.emf.ecore.xmi_2.2.0.v200606051102.jar needs to be org.eclipse.emf.ecore.xmi_2.2.1.v200609210005.jar 5. org.eclipse.emf.common_2.2.0.v200606051102.jar needs to be org.eclipse.emf.common_2.2.1.v200609210005.jar 6. chartengineapi.jar does not exist. I think it should be org.eclipse.birt.chart.engine_2.2.0.v20061117-1020.jar I ran tests with these scripts with some sample rptdesign files on windows (for the .bat file) and on linux (for the .sh file) and things work OK. Can some committer please review these changes. This is my first patch to BIRT and I would appreciate your comments. Thanks much.
Please note that the attached patch fixes the issue mentioned in this bugzilla. But as I was working on this issue, I found some other things and wanted to get feedback from the community. Should these questions be targeted to the birt-dev mailing list or is this bugzilla comment the right place. Here are my notes: In the 2.1.1 birt runtime download, all the jars in the ReportEngine/lib directory have been added to the birt classpath with exception of dataadapterapi.jar In the 2.2.0 birt runtime download, apart from the issues fixed above, there are more jars available. The following jars are available: axis-ant.jar axis.jar commons-discovery-0.2.jar jaxrpc.jar org.eclipse.birt.chart.engine_2.2.0.v20061117-1020.jar ( I think this supercedes the chartengineapi.jar in birt 2.1.1 download) saaj.jar viewservlets.jar wsdl4j-1.5.1.jar -- Should these jars ALSO be added to birt classpath ? -- It seems like genReport is specific to each release, so maybe it is better to checkin this script in the cvs. -- Maybe we can add some notes, so when the birt runtime download is generated for a release, or if any of the dependency jars that have version number in their name change, the scripts are also updated. Thoughts/comments? Thanks, Sunitha.
axis-ant.jar axis.jar commons-discovery-0.2.jar jaxrpc.jar saaj.jar viewservlets.jar wsdl4j-1.5.1.jar shouldn't be included in ReportEngine/lib folder, since ReportEngine don't need them. Build scripts has exclude these jars. As to inconsistent classpath, I've submit a new bug 170176. It better to generate genReport.bat/sh autmatically by script. So the similar problem could be avoided in later release. Thanks for reporting!
Thanks Xiaoying for the reply. I agree that is a good idea. Thanks for taking care of this.
Fixed.
Thanks Xiaoying for reviewing my patch. I have one comment - I think this issue should not be marked fixed till the fix goes into eclipse CVS. Please see the discussion on birt-dev in http://dev.eclipse.org/mhonarc/lists/birt-dev/msg06962.html "The committer should make sure that the changes go up to the CVS first before marking the bug as fixed. "
Comment on attachment 56501 [details] patched genReport.bat per Ganymede IP log
Comment on attachment 56502 [details] Patched genReport.sh per Ganymede IP log