Bug 424150 - org.eclipse.modisco.java.discoverer.ui has bad Require-Bundle header
Summary: org.eclipse.modisco.java.discoverer.ui has bad Require-Bundle header
Status: ASSIGNED
Alias: None
Product: MoDisco
Classification: Modeling
Component: Main (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-16 11:40 EST by Thomas Watson CLA
Modified: 2013-12-26 04:24 EST (History)
1 user (show)

See Also:
gdupe: luna+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2013-12-16 11:40:32 EST
The bundle org.eclipse.modisco.java.discoverer.ui manifest [1] has the following bad Require-Bundle header

 org.eclipse.modisco.kdm.source.extension;bundle-version="0.9.0";reprovide=true

The issue is the attribute reprovide=true.  In luna we no longer support this interim way to reexport a required bundle.  The OSGi specification requires each arbitrary attribute on a require bundle statement to be included in the matching filter for the requirement.  If you try to install and resolve this bundle on Luna you will get the following exception which shows the bad filter (reprovide=true) being included.  You should instead use the directive visibility:="reexport".

org.osgi.service.resolver.ResolutionException: Unable to resolve osgi.identity; osgi.identity="org.eclipse.modisco.java.discoverer.ui"; type="osgi.bundle"; version:Version="0.12.0.201311091050"; singleton:="true": missing requirement osgi.wiring.bundle; filter:="(&(osgi.wiring.bundle=org.eclipse.modisco.java.discoverer)(bundle-version>=0.9.0))" [caused by: Unable to resolve osgi.identity; singleton="true"; osgi.identity="org.eclipse.modisco.java.discoverer"; type="osgi.bundle"; version:Version="0.12.0.201311091050": missing requirement osgi.wiring.bundle; filter:="(&(osgi.wiring.bundle=org.eclipse.modisco.kdm.source.extension)(reprovide=true)(bundle-version>=0.9.0))"]
	at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:291)
	at org.apache.felix.resolver.Candidates.populate(Candidates.java:154)
	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:146)
	at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolveSingleRevision(ModuleResolver.java:944)
	at org.eclipse.osgi.container.ModuleResolver$ResolveProcess.resolve(ModuleResolver.java:875)
	at org.eclipse.osgi.container.ModuleResolver.resolveDelta(ModuleResolver.java:109)
	at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:471)
	at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:429)
	at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:419)
	at org.eclipse.osgi.container.Module.start(Module.java:406)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1551)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1530)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1502)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1445)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

[1] - http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.modisco/plugins/branches/0_9/org.eclipse.gmt.modisco.java.discoverer/META-INF/MANIFEST.MF
Comment 1 Thomas Watson CLA 2013-12-16 12:03:42 EST
This bundle also uses the interim header Provide-Package.  It should be using the OSGi specified header Export-Package instead.
Comment 2 Thomas Watson CLA 2013-12-16 12:04:51 EST
Sigh, also it uses the singleton=true attribute instead of the correct singleton:=true directive.
Comment 3 Gregoire Dupe CLA 2013-12-16 17:45:43 EST
(In reply to Thomas Watson from comment #2)
> Sigh, also it uses the singleton=true attribute instead of the correct
> singleton:=true directive.

Done. (org.eclipse.modisco.java.discoverer, org.eclipse.gmt.modisco.java.discoverer)

Committed revision 5248.
Comment 4 Gregoire Dupe CLA 2013-12-16 18:25:10 EST
(In reply to Thomas Watson from comment #0)
> You should instead use the directive visibility:="reexport".

Done.
Committed revision 5249.
Comment 5 Gregoire Dupe CLA 2013-12-16 18:34:20 EST
(In reply to Thomas Watson from comment #1)
> This bundle also uses the interim header Provide-Package.  It should be
> using the OSGi specified header Export-Package instead.

Done.
Committed revision 5250.

All should be good. I'm still waiting the next build to try to install on Luna.

Thank you for your help.