BIRT POJO runtime not working
See original GitHub issueI used the Eclipse setup to download and compile the current “master” today.
This generated the file birt-runtime-4.9.0-20220105.zip (in build\birt-packages\birt-runtime\target). Unzipped this file and added \Path\to\ReportEngine\lib* to the CLASSPATH environment variable. Then I tested creating reports from within our application.
This fails with an exception like
org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report. at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:1826) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:149) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:65) at com.tp.server.lisa.birt.report.BirtReportGenerator.run(BirtReportGenerator.java:433) Caused by: java.lang.ExceptionInInitializerError at org.eclipse.birt.report.engine.emitter.pdf.PDFRender.createPageDevice(PDFRender.java:62) at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.start(PageDeviceRender.java:111) at org.eclipse.birt.report.engine.layout.emitter.PageEmitter.start(PageEmitter.java:50) at org.eclipse.birt.report.engine.nLayout.LayoutEngine.start(LayoutEngine.java:265) at org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.start(CompositeContentEmitter.java:171) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:140) … 2 more Caused by: java.lang.NullPointerException at org.eclipse.core.internal.runtime.InternalPlatform.getBundles(InternalPlatform.java:232) at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:222) at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1442) at org.eclipse.birt.report.engine.internal.util.BundleVersionUtil.getBundleVersion(BundleVersionUtil.java:33) at org.eclipse.birt.report.engine.emitter.pdf.PDFPageDevice.<clinit>(PDFPageDevice.java:84) … 8 more
Another report (which uses the DOCX emitter instead of the PDF emitter failed with a similar error in the stacktrace while trying to load the JDBC driver.
Has anybody successfully tested the (non-osgi) runtime?
Note:
Generating reports worked with Java 8 and my fork hvbtup/birt (branch flugtiger-master).
I’ve performed the process of building BIRT (using Maven) and using the generated birt-runtime-4.*.zip several times and never had any problems until now, thus I am pretty sure that my environment variables etc. are ok. The number and size of the jar files in reportengine/lib seems to be ok as well.
The difference is that now I am using the eclipse/master trunk (after the “BIRT reboot”) and Java 11 instead of Java 8.
In case of PDFPageDevice.java we know exactly what bundle is searched, because the error happens in this line:
protected static String[] versionInfo = new String[] {
BundleVersionUtil.getBundleVersion("org.eclipse.birt.report.engine") };
As a side note, launching “BIRT all-in-one.launch” and previewing reports from the launched “Report-All-In-One” designer works like a charm. The only thing I had to adjust to make it work was to check an entry for OSGI in the .launch file:
Can someone please confirm that the BIRT runtime (generated fresh from master) is working with Java 11 or tell me what’s wrong here?
Issue Analytics
- State:
- Created 2 years ago
- Comments:23 (21 by maintainers)
Top GitHub Comments
@wimjongman You are my hero for today! I can confirm that is does work now with the POJO runtime.
BTW with Java 17 at least the exception (when using the POJO runtime) is clearer:
Caused by: java.lang.NullPointerException: Cannot invoke “org.osgi.framework.wiring.FrameworkWiring.findProviders(org.osgi.resource.Requirement)” because “this.fwkWiring” is null at org.eclipse.core.internal.runtime.InternalPlatform.getBundles(InternalPlatform.java:232) at org.eclipse.core.internal.runtime.InternalPlatform.getBundle(InternalPlatform.java:222) at org.eclipse.core.runtime.Platform.getBundle(Platform.java:1442) at org.eclipse.birt.report.engine.internal.util.BundleVersionUtil.getBundleVersion(BundleVersionUtil.java:36) at org.eclipse.birt.report.engine.emitter.pdf.PDFPageDevice.<clinit>(PDFPageDevice.java:84) … 10 more
My comparison of the builds didn’t give me more insight, unfortunately. I can see that the files are more or less the same (some differences caused by timestamps in the filenames) There are some differences in some xml and properties files inside JAR files. A lot of differences in class files, but that doesn’t necessarily mean that the code is actually different. I wish we had reproducible builds.