FW: Felix and Eclipse PDE roadblockYalcin and Jeff,
I have attached a short summary of the changes made to the Eclipse bundles to
get the Equinox extension registry working in Felix. I apologize for the delay
as other projects were in the way. I'm not sure at this stage what bug reports
I need to open. I suggest that we discuss this summary over at the Equinox
mailing list instead. Regards.
Rick Litton
-----Original Message-----
From: Jeff McAffer [mailto:[EMAIL PROTECTED]
Sent: Sun 12/10/2006 6:01 AM
To: [email protected]
Subject: RE: Felix and Eclipse PDE roadblock
Great news! Can you open bug reports in Eclipse/Equinox/Bundles for any
changes that you think should be made in Equinox to make this work more
seamlessly? Please send me or equinox-dev any additional info you might
have so we can add this to the wiki and others can benefit.
As for the "split package" (org.eclipse.core.runtime) we certainly did not
do this willingly. We tried and tried to avoid it but in the end could
not without breaking backwards compatibility. The extension registry API
have been around for many years and are widely used. Unfortunately, the
registry APIs were tightly coupled with the original Eclipse runtime API
(we never envisioned that the runtime would exist independent of the
registry) so are stuck. This is similar the the way the OSGi service
registry APIs are coupled to the OSGi modularity APIs.
Anyway, if Felix supports Require-Bundle then this should all just work
(i.e., we are not doing anything Eclipse-specific in this area). According
to the R4 spec, Require-Bundle is the only way to join two or more package
fragments from different bundles.
Jeff
"Rick Litton" <[EMAIL PROTECTED]>
12/10/2006 03:06 AM
Please respond to
[email protected]
To
<[email protected]>, <[email protected]>,
<[email protected]>
cc
Subject
RE: Felix and Eclipse PDE roadblock
I finally got the equinox extension point registry running. It was not
easy to say the least. I had to make some changes to the equinox code and
manifest files. It's still a long way off from being perfect but it seems
to work (see below)!
-> ps
START LEVEL 1
ID State Level Name
[ 0] [Active ] [ 0] System Bundle (0.8.0.SNAPSHOT)
[ 1] [Active ] [ 1] Apache Felix Shell Service (0.8.0.SNAPSHOT)
[ 2] [Active ] [ 1] Apache Felix Shell TUI (0.8.0.SNAPSHOT)
[ 3] [Active ] [ 1] Apache Felix Bundle Repository
(0.8.0.SNAPSHOT)
[ 4] [Active ] [ 1] OSGi R4 Core Bundle (4)
[ 5] [Active ] [ 1] OSGi R4 Compendium Bundle (4)
[ 6] [Active ] [ 1] Servlet 2.1 API (0.8.0.SNAPSHOT)
[ 7] [Active ] [ 1] Eclipse Equinox Supplement
(1.0.0.200612091415)
[ 8] [Active ] [ 1] HTTP Service (0.8.0.SNAPSHOT)
[ 9] [Active ] [ 1] Eclipse Equinox Common (3.3.0.200612091417)
[ 10] [Active ] [ 1] Eclipse Equinox Registry
(3.2.100.200612091419)
[ 11] [Active ] [ 1] Application Plug-in (1.0.0)
->
Will need to add the equinox http bundles in lieu of the felix http since
my example requires this service. One issue that could have been avoided
was the doubling of the package name "org.eclipse.core.runtime" in two
equinox bundles (common and registry). From experience with Oscar, this
can be problematic. If there is an area for "examples" in the Felix
repository I can probably check in the files with a readme to explain what
was done.
Thanks to Richard and Jeff ("the McAffer guy")!
-- rick
-----Original Message-----
From: Rick Litton [mailto:[EMAIL PROTECTED]
Sent: Sat 12/9/2006 10:14 AM
To: [email protected]; [email protected]
Subject: RE: Felix and Eclipse PDE roadblock
Hi Jeff,
Thanks for the tip. I will try it...
Regards,
Rick
-----Original Message-----
From: Jeff McAffer [mailto:[EMAIL PROTECTED]
Sent: Fri 12/8/2006 8:09 PM
To: [email protected]
Subject: Re: Felix and Eclipse PDE roadblock
Rick
As a point of interest, you should be able to use the Equinox Supplement
bundle
http://www.eclipse.org/equinox/bundles#supplement
rather than org.eclipse.osgi. This bundle is designed to supply the bits
of the Equinox framework that are needed in other OSGi scenarios.
I believe some folks in Equinox land have gotten the registry working on
Knopflerfish. Not sure if they have tried Felix. Perhaps you should ask
on the equinox newsgroup for some guidance. I'm sure they would be happy
to compare notes
Jeff
"Rick Litton" <[EMAIL PROTECTED]>
12/08/2006 01:57 PM
Please respond to
[email protected]
To
<[email protected]>
cc
Subject
Felix and Eclipse PDE roadblock
I'm still trying to get the extension points registry to work in Felix
and unfortunately, I have hit a roadblock. After trying out several
combinations and pruning the eclipse core bundle (as Richard Hall has
suggested) to remove redundant osgi core classes, I have created the
following dependency graph to help illustrate the problem:
/---> org.osgi.compendium
|
| (requires: org.osgi.util.tracker package)
|
|---> org.osgi.core
|
| (requires: org.osgi.service.permissionadmin package)
|
| org.eclipse.osgi_3.2.1R32x <----\
| ^ |
| (requires:|org.eclipse.osgi.service.urlconversion package)
| | |
|---- org.eclipse.equinox.common |
| ^ |
| | |
| | |
\---- org.eclipse.equinox.registry |
| |
| |
\---------------------/
(requires: org.eclipse.osgi.service.datalocation package)
I hope the graph is displayed correctly by your mail client. Anyhow, I
was getting quite a few BundleExceptions "Unable to resolve due to
constraint violation"). So I removed all the optional bundles and
proceeded to test each one. Immediately, the BundleException came up
after I had just added/started the org.osgi.core bundle. I certainly
would welcome any suggestion to resolve this problem.
Rick Litton
Plugin/Bundle Name Operation Changes
---------------------- ------------------
--------------------------------------
org.eclipse.osgi.X.jar delete Removed all files from these
packages:
org.osgi.framework
org.osgi.service.condpermadmin
org.osgi.service.packageadmin
org.osgi.service.permissionadmin
org.osgi.service.startlevel
org.osgi.service.url
org.osgi.util.tracker
modified Updated the manifest file:
removed package references
from Export-Package
added Import-Package: \
org.osgi.framework, \
org.osgi.service.condpermadmin, \
org.osgi.service.packageadmin, \
org.osgi.service.permissionadmin, \
org.osgi.service.startlevel, \
org.osgi.service.url, \
org.osgi.util.tracker
org.osgi.core-X.jar added Auto-started the bundle.
org.osgi.compendium-X.jar added Auto-started the bundle.
org.eclipse.equinox.supplement_X.jar replace Remove and replace
org.eclipse.osgi.
org.eclipse.equinox.common_X.jar modified Tried to export package
containing
IStatus and CoreException
but this is
a split package which causes
the registry
bundle to fail.
modified Class ResourceTranslator.
Changed this line
to resolve NPE:
...b.getHeaders("").get(Constants... to
...b.getHeaders().get(Constants...
org.eclipse.equinox.registry_X.jar modified Added Istatus and
CoreException to
org.eclipse.core.runtime
package to resolve
NoClassDefFoundError. Also
added in
ListenerList, Status and
MultiStatus later.
To avoid this error, just
added in all the
other classes found in
org.eclipse.core.runtime
from common bundle.
modified Class EclipseBundleListener.
Changed this
line to resolve NPE:
...bundle.getHeaders("") to
...bundle.getHeaders()
added To import-package in
manifest:
org.eclipse.core.internal.runtime
Also removed the additional
markup of this
package in export-package of
common jar to avoid
unresolved package exception.
Also: hardcoded bundle names to manifest of the 3 eclipse bundles as this is
customary in
Apache Felix.