Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341460 - OSGi state explorer does not show uses violation diagnostics
Summary: OSGi state explorer does not show uses violation diagnostics
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.0.0.M05   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 06:22 EDT by Glyn Normington CLA
Modified: 2011-05-04 11:49 EDT (History)
0 users

See Also:


Attachments
Bundle to place in repository/usr (452 bytes, application/java-archive)
2011-03-31 06:22 EDT, Glyn Normington CLA
no flags Details
Bundle to place in repository/usr (421 bytes, application/java-archive)
2011-03-31 06:22 EDT, Glyn Normington CLA
no flags Details
Bundle to place in repository/usr (421 bytes, application/java-archive)
2011-03-31 06:23 EDT, Glyn Normington CLA
no flags Details
Bundle to deploy (440 bytes, application/java-archive)
2011-03-31 06:23 EDT, Glyn Normington CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington CLA 2011-03-31 06:22:02 EDT
The diagnostics issued to the event log contain uses violation diagnostics like this:

Unable to satisfy dependencies of bundle 'org.example.foo.xydata' at version '0.0.0': Cannot resolve: org.example.foo.xydata
    Resolver report:
        Uses violation: <Import-Package: org.example.foo.bar.datastore; version="0.0.0"> in bundle <org.example.foo.xydata_0.0.0[1301563814803]>
            Found conflicts:
                package        'org.example.foo.util.verify_1.0.0' in bundle 'org.example.foo.platform.util_0.0.0[1301563814806]' used by 'org.example.foo.bar.datastore_0.0.0' in bundle 'org.example.foo.bar.datastore_0.0.0[1301563814805]'
                conflicts with 'org.example.foo.util.verify_2.0.0' in bundle 'org.example.foo.framework_0.0.0[1301563814804]' imported by bundle 'org.example.foo.xydata_0.0.0[1301563814803]'

but when the corresponding state dump is viewed in the admin console OSGi state explorer, the unresolveable bundle shows the following diagnostics:

State resolver report for 'org.example.foo.xydata - 0.0.0'

Bundle Symbolic Name	org.example.foo.xydata
Bundle Version	0.0.0
Bundle ID	1301563814803
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.example.foo.xydata
    Unsatisfied leaf constraints:
        Bundle: org.example.foo.xydata_0.0.0 - Import-Package: org.example.foo.bar.datastore; version="0.0.0"
            Did you mean: 'org.eclipse.osgi.baseadaptor'?
        Bundle: org.example.foo.xydata_0.0.0 - Import-Package: org.example.foo.util.verify; version="[2.0.0,2.1.0)"
            Did you mean: 'org.eclipse.virgo.util.io'?

The OSGi state resolve should produce a uses constraint violation diagnostic as in the event log.

Steps to reproduce:
1. Place the attached bundles org.example.foo.bar.datastore.jar, org.example.foo.framework.jar, and		org.example.foo.platform.util.jar in repository/usr.
2. Deploy the attached bundle org.example.foo.xydata.jar e.g. by copying it to pickup.
3. Observe the uses constraint diagnostics in the event log.
4. Note the dump id in the event log, e.g. <ME0003I> Dump 'serviceability/dump/2011-03-31-10-30-868' generated.
5. In the admin console, navigate to the OSGi state explorer and choose the state dump observed in step 4 using the drop down.
6. Find the unresolved bundle org.example.foo.xydata and click on the "Unresolved" link.
Comment 1 Glyn Normington CLA 2011-03-31 06:22:44 EDT
Created attachment 192259 [details]
Bundle to place in repository/usr
Comment 2 Glyn Normington CLA 2011-03-31 06:22:59 EDT
Created attachment 192260 [details]
Bundle to place in repository/usr
Comment 3 Glyn Normington CLA 2011-03-31 06:23:17 EDT
Created attachment 192261 [details]
Bundle to place in repository/usr
Comment 4 Glyn Normington CLA 2011-03-31 06:23:33 EDT
Created attachment 192262 [details]
Bundle to deploy
Comment 5 Glyn Normington CLA 2011-05-04 11:49:42 EDT
Fixed by re-resolving the state after it is read in by the admin console.