Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Upgrade from Birt 2.5.2 to Birt 3.7.1
kallen
We previously used the code below to set up Birt Engine to use within our servlet, the migration guide says you just need to add the BIRT jars to the classpath, the birt jars were added to WEB-INF\lib.
When we run the app now, IReportEngineFactory returns null. Any input appreciated.
public static synchronized IReportEngine getBirtEngine(ServletContext sc) throws Exception {
EngineConfig config = new EngineConfig();
config.setBIRTHome("");
config.setLogConfig("C:/Temp", Level.FINEST);
config.setLogFile("birtLog.log");
realPath = sc.getRealPath("/reports");
IPlatformContext context = new PlatformServletContext(sc);
config.setPlatformContext(context);
try {
Platform.startup(config);
// log.info("Birt Home is: " + config.getPlatformContext().toString());
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject
(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
birtEngine = factory.createReportEngine(config);
}
catch (Exception e ) {
throw e;
}
return birtEngine;
}
Find more posts tagged with
Comments
JasonW
Comment out this line:
config.setBIRTHome("");
Jason