Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 349520 - Web application bundle cannot be resolved when osgi.resolverMode is in strict mode
Summary: Web application bundle cannot be resolved when osgi.resolverMode is in strict...
Status: CLOSED FIXED
Alias: None
Product: Gemini.Web
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0.0.M02   Edit
Assignee: Violeta Georgieva CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 02:24 EDT by Violeta Georgieva CLA
Modified: 2011-07-01 09:42 EDT (History)
1 user (show)

See Also:


Attachments
Patch proposal (14.50 KB, patch)
2011-06-17 04:38 EDT, Violeta Georgieva CLA
glyn.normington: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Violeta Georgieva CLA 2011-06-16 02:24:38 EDT
The exception below is thrown when osgi.resolverMode is in strict mode:

The bundle "xxx" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.osgi.internal.provisional.verifier; version="[0.0.0,0.0.0]"
Comment 1 Violeta Georgieva CLA 2011-06-17 04:38:11 EDT
When the "osgi.resolverMode" is set to "strict" we have the following requirement:
"strict - the resolver is in strict mode and will enforce access restriction rules when loading classes and resources from exported packages which specify the x-internal or x-friends directives."

When generating the web application manifest, we are adding to its export packages, all system bundle exports. We are using PackageAdmin for this purpose and it appears that we add also the system bundle exports that have x-internal or x-friends directives. This is the cause for the failure.

org.eclipse.gemini.web.internal.SystemBundleExportsResolver is the class that is responsible for resolving system bundle export packages.

Instead of PackageAdmin, I'm using now the new API - BundleWiring and BundleCapability. 

I'm attaching a patch for this bug. Can you please review it and comment on it.

Thanks
Vily
Comment 2 Violeta Georgieva CLA 2011-06-17 04:38:56 EDT
Created attachment 198165 [details]
Patch proposal
Comment 3 Glyn Normington CLA 2011-06-17 04:45:03 EDT
Comment on attachment 198165 [details]
Patch proposal

Looks good.
Comment 4 Violeta Georgieva CLA 2011-06-17 06:04:14 EDT
Thanks
Change committed, tested and pushed.