Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 180309 - bundle cannot be resolved if equinox cache is around
Summary: bundle cannot be resolved if equinox cache is around
Status: RESOLVED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Framework (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: equinox.framework-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-30 17:43 EDT by shean chang CLA
Modified: 2010-10-21 17:17 EDT (History)
2 users (show)

See Also:


Attachments
reproducer jar (1.41 MB, application/x-java-archive)
2007-03-30 17:45 EDT, shean chang CLA
no flags Details
replace the previous jar (885.33 KB, application/x-java-archive)
2007-04-02 15:49 EDT, shean chang CLA
no flags Details
replace the previous jar (885.33 KB, application/x-java-archive)
2007-04-02 15:49 EDT, shean chang CLA
no flags Details
replace the previous jar (885.33 KB, application/x-java-archive)
2007-04-02 15:51 EDT, shean chang CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description shean chang CLA 2007-03-30 17:43:45 EDT
Build ID: N/A

Steps To Reproduce:
1.see the attached README file in the reproducer.jar
2.
3.


More information:
Comment 1 shean chang CLA 2007-03-30 17:45:27 EDT
Created attachment 62571 [details]
reproducer jar 

Please see the "README" file in the reproducer.jar for information of the problem
Comment 2 shean chang CLA 2007-03-30 17:46:39 EDT
See "README" file inside the attached "reproducer.jar" for information of the problem.
Comment 3 shean chang CLA 2007-04-02 15:49:41 EDT
Created attachment 62703 [details]
replace the previous jar
Comment 4 shean chang CLA 2007-04-02 15:49:55 EDT
Created attachment 62704 [details]
replace the previous jar
Comment 5 shean chang CLA 2007-04-02 15:51:28 EDT
Created attachment 62705 [details]
replace the previous jar
Comment 6 Thomas Watson CLA 2007-04-02 17:02:19 EDT
The fragment bundle com.bea.core.xquery.beaxmlbeans-interop is adding new constraints to its host com.bea.core.xml.beaxmlbeans.  Here is what happens:

1) In your "small" configuration you have com.bea.core.xml.beaxmlbeans installed and resolved.
2) Then you move up to your "large" configuration which includes the fragment com.bea.core.xquery.beaxmlbeans-interop.  This bundle adds new imports to its bundle host com.bea.core.xml.beaxmlbeans.
3) When trying to resolve the fragment com.bea.core.xquery.beaxmlbeans-interop the resolver tries to attach it to an already resolved host bundle com.bea.core.xml.beaxmlbeans.  But this is not allowed because a fragment cannot add new constraints to an already resolved host.  The only time new constraints can be added to a host bundle is if the host and fragment bundles are resolved at the same time.

If I run the "refresh" command on the com.bea.core.xml.beaxmlbeans bundle I see the fragment get attached which allows the weblogic.xml.query.xmlbeans.bea package to become available for import.  This allows the com.bea.core.xquery to resolve.

I don't have a good solution/work around for you.  We could add smarts to PackageAdmin.refreshPackages to pull in possible fragment hosts when resolving a fragment bundles, but this hard codes the policy into the framework which we like to avoid.
Comment 7 Thomas Watson CLA 2010-10-21 17:17:09 EDT
We cannot fix this in the framework.  p2 has logic to detect this and will automatically refresh your host bundle for you.