Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
Using BIRT 4.2.0 : Build multiple ReportEngine
Migrateduser
Happy new year to everyone,<br />
<br />
I am using BIRT 4.2.0 in my web application and i am trying to build multiple ReportEngine in my application. I use following code to create a ReportEngine.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public static synchronized IReportEngine getReportEngine()
throws Exception {
if (reportEngine == null) {
try {
EngineConfig config = new EngineConfig();
config.setLogConfig(Configuration.BIRT_LOG_DIRECTORY,
getBIRTLogLevel(Configuration.BIRT_LOG_LEVEL));
config.setResourcePath(Configuration.BIRT_RESOURCE_PATH);
config.setLogRollingSize(Configuration.BIRT_LOG_ROLLING_SIZE);
config.setLogMaxBackupIndex(Configuration.BIRT_LOG_MAX_BACKUP_INDEX);
config.getAppContext().put(EngineConstants.WEBAPP_CLASSPATH_KEY,"");
config.getAppContext().put(EngineConstants.APPCONTEXT_DATASET_CACHE_OPTION,true);
config.getAppContext().put(DataEngine.DATASET_CACHE_OPTION,true);
Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
if(null == factory){
log.warn("IReportEngineFactory is null");
}
reportEngine = factory.createReportEngine(config);
log.debug("BIRT report engine was created");
} catch (Exception e) {
log.error("BIRT report engine creation failed.");
throw e;
}
if (reportEngine == null) {
log.error("BIRT report engine is null after its creation.");
}
}
return reportEngine;
}
</pre>
<br />
With this code, i got folowing error<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
</pre>
<br />
It is possible to have multiple ReportEngine in an application?<br />
Can someone help me to do that?<br />
<br />
Thanks for your help.<br />
<br />
Eric.
Find more posts tagged with
Comments
There are no comments yet