Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350801 - Cannot deploy a fragment bundle once the host bundle has already been resolved
Summary: Cannot deploy a fragment bundle once the host bundle has already been resolved
Status: CLOSED WONTFIX
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 07:42 EDT by Frieder Heugel CLA
Modified: 2011-07-14 12:13 EDT (History)
1 user (show)

See Also:


Attachments
Example bundles (853 bytes, application/x-zip-compressed)
2011-06-30 07:46 EDT, Frieder Heugel CLA
no flags Details
Console output (11.86 KB, text/plain)
2011-07-01 06:24 EDT, Frieder Heugel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frieder Heugel CLA 2011-06-30 07:42:23 EDT
Build Identifier: 3.0.0.M5

When trying to deploy a fragment bundle to the pickup directory after the host bundle has already been resolved an exception is thrown and the fragment bundle does not enter the INSTALLED state. 

The same fragment can be deployed without an exception when the host bundle has not been resolved at the same time.

Reproducible: Always

Steps to Reproduce:
1. Drop the host bundle in repository/usr/
2. Start Virgo
3. Drop the fragment1 bundle in pickup/

Everything should work fine and the host bundle should have an additional package import.

1. Start Virgo
2. Drop the host bundle into pickup/
3. Drop the fragment1 bundle into pickup/

Now an exception is thrown saying that the fragment could not be resolved because of a conflict with the host.
Comment 1 Frieder Heugel CLA 2011-06-30 07:46:08 EDT
Created attachment 198899 [details]
Example bundles
Comment 2 Glyn Normington CLA 2011-07-01 06:07:13 EDT
Please could you provide the console output for the failing case so that people can easily spot if they are hitting the same problem.
Comment 3 Frieder Heugel CLA 2011-07-01 06:24:48 EDT
Created attachment 198955 [details]
Console output
Comment 4 Glyn Normington CLA 2011-07-01 07:05:09 EDT
(In reply to comment #3)
> Created attachment 198955 [details]
> Console output

Thanks Frieder!
Comment 5 Glyn Normington CLA 2011-07-14 12:13:18 EDT
I have reproduced the problem and, on reflection, have decided that this behaviour is working as designed. There's not much we can do to influence the behaviour of the Equinox resolver and since pickup deployment always involve resolution, this error is expected. Also, the diagnostics give a pretty clear hint that the resolved host is the root of the problem.

Note that a fragment can be successfully attached to a resolved host if the fragment does not import any packages (or do anything else which would require the host to be "re-resolved"). So the mention of the import package constraint conflict in the resolver report is accurate:

        The fragment could not be resolved because of a constraint conflict with a host, possibly because the host is already resolved. The affected fragment is org.example.fragment1_1.0.0
            Possible hosts:
                org.example.host_1.0.0 (resolved)
            Constraint conflict:
                Import-Package: javax.servlet; version="0.0.0"

One potential enhancement which might help this scenario is if Virgo provided the ability to install but not start a bundle. Then it should be possible to install the fragment and then refresh the host.

Note that refreshing the host should pick up the fragment from the repository if and when enhancement bug 350805 is implemented.