Bug 448623 - DUPLICATE_DUPLICATE_STYLE_NAME / DUPLICATE_EXTENSION_NAME errors on reading design documents
Summary: DUPLICATE_DUPLICATE_STYLE_NAME / DUPLICATE_EXTENSION_NAME errors on reading d...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 4.4.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Birt-ReportEngine-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-24 06:30 EDT by Volker Althaus CLA
Modified: 2014-10-24 08:14 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Althaus CLA 2014-10-24 06:30:11 EDT
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
Comment 1 Volker Althaus CLA 2014-10-24 06:57:28 EDT
I will try to provide a standalone example the next days. Would be interesting if the errors also occur outside of the OSGI environment.
Comment 2 Volker Althaus CLA 2014-10-24 08:14:40 EDT
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.