Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 349520

Summary: Web application bundle cannot be resolved when osgi.resolverMode is in strict mode
Product: [RT] Gemini.Web Reporter: Violeta Georgieva <milesg78>
Component: unknownAssignee: Violeta Georgieva <milesg78>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington
Version: unspecified   
Target Milestone: 2.0.0.M02   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch proposal glyn.normington: review+

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.