<span style='font-family: Trebuchet MS'><br />
<br />
Hi,<br />
<br />
I am trying out spring and birt integration example from <a class='bbc_url' href='
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT'>springsource.org</a> (<a class='bbc_url' href='
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT'>http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT</a>). I am using spring 3.1.1 and birt 3.7.2.<br />
<br />
The example works on tomcat 6.0.35 but I need to running on WAS 6.1.<br />
<br />
Here is how the engine is started up<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public IReportEngine getObject() {
final EngineConfig config = new EngineConfig();
//This line injects the Spring Context into the BIRT Context
config.getAppContext().put("spring", this.context );
config.setBIRTHome("");
config.setLogConfig( null != this._resolvedDirectory ? this._resolvedDirectory.getAbsolutePath() : null , this.logLevel);
try {
Platform.startup( config );
}
catch ( BirtException e ) {
throw new RuntimeException ( "Could not start the Birt engine!", e) ;
}
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
IReportEngine engine = factory.createReportEngine( config );
engine.changeLogLevel(Level.FINEST);
this.birtEngine = engine ;
return engine;
}
</pre>
<br />
and my destroy method<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public void destroy() throws Exception {
birtEngine.destroy();
Platform.shutdown();
RegistryProviderFactory.releaseDefault();
birtEngine = null;
}
</pre>
<br />
The details of this example can be found on link provided above<br />
<br />
If I run it on WAS 6.1 I get this error<br />
<br />
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform<br />
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:81)<br />
at momentum.wealth.wlisp.report.birt.engine.core.BirtEngineFactory.getObject(BirtEngineFactory.java:50)<br />
... 119 more<br />
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath<br />
at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:99)<br />
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:75)<br />
... 120 more<br />
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.<br />
at org.eclipse.core.internal.registry.RegistryProviderFactory.setDefault(RegistryProviderFactory.java:31)<br />
at org.eclipse.core.runtime.RegistryFactory.setDefaultRegistryProvider(RegistryFactory.java:126)<br />
at org.eclipse.birt.core.framework.jar.ServiceLauncher.startup(ServiceLauncher.java:84)<br />
... 121 more<br />
<br />
NB : See the attached file for the full stacktrace<br />
<br />
Any help will be appreciated...<br />
<br />
<br />
</span>