question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BIRT POJO runtime not working

See original GitHub issue

I 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: grafik

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:closed
  • Created 2 years ago
  • Comments:23 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
hvbtupcommented, Jan 26, 2022

@wimjongman You are my hero for today! I can confirm that is does work now with the POJO runtime.

1reaction
hvbtupcommented, Jan 24, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BIRT Report using POJOs unning under tomcat - Stack Overflow
The problem is that I use Apache FOP library in the same web project, where I use BIRT. If we will go to...
Read more >
ReferenceError to POJO when using BIRT runtimes ... - Eclipse
I'm building a reportingsystem in Eclipse Scout which is going to use BIRT runtimes for the reporting part of things.
Read more >
Birt Runtime with Pojo-Dataset DS-Parameter
For our Developer Trial users, if you experience any issues signing in to the Developer site or our Developer console, please refer to...
Read more >
Viewer Setup | BIRT - Eclipse Foundation
BIRT POJO Viewer. ... The file is named birt-runtime-version#.zip. ... If you are installing BIRT 2 series the driver needs to be copied...
Read more >
Reporting with Eclipse BIRT and Java Objects (POJO's)
core.runtime); /* load bundle with POJOs and data loading class */ myBundle = Platform.getBundle("de.vogella.birt.stocks"); /* load ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found