Integration of BIRT to Orion application server (v 2.0.7) [message #191552] |
Fri, 22 September 2006 03:32 |
Eclipse User |
|
|
|
Originally posted by: junbihag.yahoo.com
I followed the Servlet example in the link
http://wiki.eclipse.org/index.php/Servlet_Example. I modified the
WebReport.java to be an Action class in a Struts framework. It works
fine with Tomcat 5.5 but I'm getting a null pointer exception when I use
the Orion 2.0.7.
The java.lang.NullPointerException error is at method
BirtEngine.getBirtEngine().
I use the same BirtEngine.java from the example and the error occurs on
the line "birtEngine = factory.createReportEngine(config);". The factory
(IReportEngineFactory)is null and is causing the error.
Here's the BirtEngine.getBirtEngine() method:
public static synchronized IReportEngine getBirtEngine(ServletContext sc) {
if (birtEngine == null) {
EngineConfig config = new EngineConfig();
if (configProps != null) {
String logLevel = configProps.getProperty("logLevel");
Level level = Level.OFF;
if ("SEVERE".equalsIgnoreCase(logLevel)) {
level = Level.SEVERE;
}
...
config.setLogConfig(configProps.getProperty("logDirectory"), level);
}
config.setEngineHome("");
IPlatformContext context = new PlatformServletContext(sc);
config.setPlatformContext(context);
try {
Platform.startup(config);
} catch (BirtException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
}
IReportEngineFactory factory =
(IReportEngineFactory)
Platform.createFactoryObject(IReportEngineFactory.EXTENSION_ REPORT_ENGINE_FACTORY);
birtEngine = factory.createReportEngine(config);
}
return birtEngine;
}
I also noticed that a log in "\webreport\WEB-INF\platform\configuration"
contains errors such as:
Could not install bundle plugins/org.apache.derby.core/ Error
converting plugin at C:\Program
Files\orion2.0.7\applications\webreport\WEB-INF\platform\plu gins\org.apache.derby.core.
or
Could not parse XML contribution for
"org.eclipse.birt.chart.device.extension/plugin.xml".
Thank you in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.05237 seconds