Community
Participate
Working Groups
We've managed to create an all-in-one OSGI bundle of the Birt Runtime to use it in an Apache Karaf OSGI container. While reading the report design document several error messages appear: Message:Duplicate style names when adding the predefined style [crosstab-cell] to the meta-data dictionary. Error code:DUPLICATE_STYLE_NAME Message:Duplicate extension name when adding the extension [Crosstab] to the meta-data dictionary. Error code:DUPLICATE_EXTENSION_NAME ... and so on... I've debugged the thing and found the following reason for these errors. The responsible code is in org.eclipse.birt.report.model.metadata.MetaDataDictionary, line 570-573. 1. The default style (rom.def) is read and the styles added to the dictionary. 2. The extensions of the bundle org.eclipse.birt.runtime/plugin.xml are read via the extension manager. And in these extensions we've the same style names again. So when adding them to the dictionary again, the exception is thrown. I googled around and found the two following relevant links, but none with a suitable answer: - http://www.eclipse.org/forums/index.php/t/206454/ - http://developer.actuate.com/community/forum/index.php?/topic/33540-birt-431-karaf-felix-duplicate-aggregation-name-count/ As a workaround, because the errors seem not to have consequences, we could set the log level of the runtime to FATAL, but a real solution would be nice. Any ideas, workarounds or suggestions? Regards
I will try to provide a standalone example the next days. Would be interesting if the errors also occur outside of the OSGI environment.
In a standalone snippet all is OK. But now I found the real cause. My analysis in the initial post turned out as wrong. It must have something to to with the Karaf environment. In standalone the PeerExtensionLoader gets only 2 Extensions out of the ExtensionPoint "org.eclipse.birt.report.model.reportItemModel". In Karaf OSGI its getting *64* extensions! And all of them are duplicates. And the debugger says they are all from different bundles, even if these bundles don't have a plugin.xml at all. It looks like the Birt platform and it's ExtensionRegistry does something wrong in the Karaf environment and "sees" extensions that do not really exist. At this point I'm out. Think I'll do the workaround with the LogLevel.