I am trying to create a Java, not web, app to generate report documents from BIRT reports and all the samples I can find get to a point where they call something like the following:
config = new EngineConfig( );
config.setEngineHome( "E:/Development/birt-runtime-2_5_2/ReportEngine" );
config.setLogConfig("E:/Development/birt_logs", Level.FINE);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
As soon as it hits the createReportEngine it gets a nullPointerException. I have tried the full BIRT runtime, the ME reporting libs and nothing works from withing ME. I was able to get it to run by using standard Eclipse with the BIRT Runtime 2.5.x, but it had problems finding the emitters.
Can anyone tell me what has to be done to get this kind of Java app to run from a ME project?
The full error I get is:
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:784)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:109)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)
at ExecuteCvsReport.executeReport(ExecuteCvsReport.java:43)
at ExecuteCvsReport.main(ExecuteCvsReport.java:100)
I am using ME 8.5 and BIRT 2.5 that comes with it.
Thanks for any thoughts,
Ed