Hello Experts, I'm still new to BIRT. <br />
Right now Im trying to call birt ReportEngine from standalone java program. and i got this Exception:<br />
<br />
Caused by: java.lang.NullPointerException<br />
at org.eclipse.birt.report.engine.api.impl.ReportEngine$EngineExtensionManager.<init>(ReportEngine.java:830)<br />
at org.eclipse.birt.report.engine.api.impl.ReportEngine.<init>(ReportEngine.java:109)<br />
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:18)<br />
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory$1.run(ReportEngineFactory.java:1)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at org.eclipse.birt.report.engine.api.impl.ReportEngineFactory.createReportEngine(ReportEngineFactory.java:14)<br />
<br />
The error occurs when I try to create Report Engine. bellow are my code snippet:<br />
<br />
public void init() {<br />
config = new EngineConfig();<br />
config.setEngineHome(BIRT_HOME);<br />
<br />
// BIRT_HOME = "C:birt-runtime-2_5_0ReportEngine"<br />
<br />
config.setLogConfig(".", Level.ALL);<br />
try {<br />
Platform.startup(config);<br />
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);<br />
if (factory == null) {<br />
System.out.println("factory null");<br />
} else {<br />
System.out.println("factory not null");<br />
engine = factory.createReportEngine(config);<br />
}<br />
} catch (BirtException ex) {<br />
Logger.getLogger(ReportGenerator.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);<br />
}<br />
<br />
I use birt runtime 2.5.0, JDK 1.6 update 14 and included all the jar files in the plugins directory of BIRT_HOME's in my classpath.<br />
<br />
there is a question mentioning the same error here:<br />
<a class='bbc_url' href='
http://www.reportingengines.com/forum/designing-birt-reports/16400-java-lang-nullpointerexception-reportengine-java-794-a.html'>java.lang.NullPointerException : ReportEngine.java:794 - Forum - BIRT Exchange</a><br />
<br />
but i cant find the solution there. I don't know what the problem is, and has stuck in this problem from quite some time. Any help/hint will be appreciated.<br />
<br />
Thank you<br />
<br />
bistok