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

Bug 345563

Summary: Omitted missing constraint in admin console OSGi state explorer
Product: [RT] Virgo Reporter: Glyn Normington <glyn.normington>
Component: runtimeAssignee: Glyn Normington <glyn.normington>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0.0.M03   
Target Milestone: 3.0.0.M05   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
zapped Spring DM extender
none
zip file of dump none

Description Glyn Normington CLA 2011-05-12 06:10:42 EDT
In the OSGi state explorer, missing constraints are sometimes not displayed.

The attached dump was created by zapping the Spring DM extender to import the package org.springframework.osgi with version range [999, 999]. The zapped JAR is also attached.

Steps to reproduce:

* Take a Tomcat server build and extract the dump zip inside serviceability/dump
* Start Tomcat server *without* -clean
* In a browser, navigate to the OSGi state explorer in the admin console
* Select the extracted dump and click "Go"
* Click the "Unresolved" link against org.springframework.osgi.extender
* The following report appears:


State resolver report for 'org.springframework.osgi.extender - 1.2.1'

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint: 
        An Import-Package could not be resolved. Caused by missing constraint in bundle 
             constraint:
Comment 1 Glyn Normington CLA 2011-05-12 06:12:07 EDT
Created attachment 195483 [details]
zapped Spring DM extender
Comment 2 Glyn Normington CLA 2011-05-12 06:12:52 EDT
Created attachment 195484 [details]
zip file of dump
Comment 3 Glyn Normington CLA 2011-05-12 06:18:59 EDT
In case the dump needs to be recreated, do the following:

* In the kernel, modify org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
* Replace the line:
 file:../ivy-cache/repository/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar@start,\
* with
 file:../ivy-cache/repository/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/zap.org.springframework.osgi.extender-1.2.1.jar@start,\
* and place the zapped Spring DM extender JAR in the kernel ivy cache as indicated by the above path
* Run a kernel integration testcase such as ApplicationContextDependencyMonitorIntegrationTests and a dump should be produced.
* Check that the dump contains an osgi.zip file which is the resolution state dump. (See bug 342719 if the state dump is missing - you may be on a back-level of the kernel.)
Comment 4 Glyn Normington CLA 2011-05-12 07:35:14 EDT
The problem was missing escaping of angle brackets when the resolution failures are displayed in HTML.

Fixing this gives the following display, which is correct:

State resolver report for 'org.springframework.osgi.extender - 1.2.1'

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.springframework.osgi.extender_1.2.1>
             constraint: <Import-Package: org.springframework.osgi; version="[999.0.0,999.0.0]">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.agent.dm_3.0.0>
             constraint: <Import-Package: org.springframework.osgi.extender.event; version="[1.2.1,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.deployer.dm_3.0.0>
             constraint: <Import-Package: org.eclipse.virgo.kernel.agent.dm; version="[3.0.0,3.1.0)">

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.springframework.osgi.extender_1.2.1>
             constraint: <Import-Package: org.springframework.osgi; version="[999.0.0,999.0.0]">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.agent.dm_3.0.0>
             constraint: <Import-Package: org.springframework.osgi.extender.event; version="[1.2.1,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.deployer.dm_3.0.0>
             constraint: <Import-Package: org.eclipse.virgo.kernel.agent.dm; version="[3.0.0,3.1.0)">

Bundle Symbolic Name	org.springframework.osgi.extender
Bundle Version	1.2.1
Bundle ID	48
Hosts/Fragments	 NA
State	Unresolved
Cannot resolve: org.springframework.osgi.extender
    Resolver report:
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.springframework.osgi.extender_1.2.1>
             constraint: <Import-Package: org.springframework.osgi; version="[999.0.0,999.0.0]">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.agent.dm_3.0.0>
             constraint: <Import-Package: org.springframework.osgi.extender.event; version="[1.2.1,2.0.0)">
        An Import-Package could not be resolved. Caused by missing constraint in bundle <org.eclipse.virgo.kernel.deployer.dm_3.0.0>
             constraint: <Import-Package: org.eclipse.virgo.kernel.agent.dm; version="[3.0.0,3.1.0)">