Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385033 - Using JFace with RWT-OSGi does not work with an OSGi framework other than Equinox
Summary: Using JFace with RWT-OSGi does not work with an OSGi framework other than Equ...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: JFace (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 06:44 EDT by Raj Saini CLA
Modified: 2012-09-07 05:40 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raj Saini CLA 2012-07-13 06:44:43 EDT
Build Identifier: 

While using RWT-OSGI and RAP JFace on Apache Karaf and Felix, RAP JFace bundle depends on org.eclipse.equinox.common bundle and org.eclipse.equinox.common bundle imports org.eclipse.equinox.log which is part of the Equinox OSGi Framework bundle. As Felix OSGi framework is already used by Karaf, I cant not deploy Equinox OSGi Framework bundle.

Due to unmet dependencies org.eclipse.equinox.common bundle is not resolved and in turn JFace bundle is not resolved. Due to this it is not possible to use the JFace with RWT-OSGI with OSGI frameworks other than Equinox. 

Reproducible: Always

Steps to Reproduce:
1. Download and install Apache Karaf. By default Apache Karaf uses Felix OSGi Framework.
2. Deploy RWT, RWT-OSGi, JFace and its dependencies into Karaf deploy folder.
3. RAP JFace bundle does not resolves as it depends on org.eclipse.equinox.common bundle and org.eclipse.equinox.common bundle imports org.eclipse.equinox.log.
4. Copy Equinox framework bundle into deploy folder and Karaf does not start as there are now two OSGi frameworks.
Comment 1 Holger Staudacher CLA 2012-08-12 14:43:00 EDT
I took a look at rap.jface and saw the the dependency to equinox.common only exists because the deprecated class ListenerList uses it. This is the only class who uses things from equinox. It's really strange that a whole bundle is required to satisfy this dependency... 

Anyway, the dependency comes form the original jface bundle. Is it an option to remove the ListenerList class in RAP? I think the benefits are much bigger than the drawbacks of this. Also it seems the class is deprecated since 2006 ;)
Comment 2 Ivan Furnadjiev CLA 2012-08-13 03:16:31 EDT
+1 to remove this class and dependency to equinox.common.
Comment 3 Markus Knauer CLA 2012-08-13 03:35:54 EDT
+1 ;-) 

We are trying to make RAP as open as possible (which includes other OSGi implementations) and this would be another step in the right direction!
Comment 4 Ivan Furnadjiev CLA 2012-08-13 04:43:21 EDT
Just looked more precisely... Unfortunately, it's not only ListenerList... If you search for "org.eclipse.core.runtime" import in the JFace bundle, you will see that it is used widely:
org.eclipse.core.runtime.IStatus
org.eclipse.core.runtime.Status
org.eclipse.core.runtime.Assert
org.eclipse.core.runtime.IProgressMonitor
org.eclipse.core.runtime.IProgressMonitorWithBlocking
org.eclipse.core.runtime.ListenerList
org.eclipse.core.runtime.OperationCanceledException
org.eclipse.core.runtime.ProgressMonitorWrapper
org.eclipse.core.runtime.ISafeRunnable
...
These are only part of the classes involved. Now I think that we can't get rid of this dependency.
Comment 5 Holger Staudacher CLA 2012-08-13 05:10:56 EDT
Hi Ivan,
I just wanted to comment. My Eclipse only showed the one error. But after taking a deeper look I came to the same result.

I tried also to install org.eclipse.equinox.common together with org.eclipse.osgi into a karaf 3.0 instance but without success.
Comment 6 Ralf Sternberg CLA 2012-08-29 07:03:29 EDT
We've created a compatibility bundle that allows to run equinox.common outside of Equinox. This bundle exports the equinox.osgi packages that are needed by equinox.common.

The bundle is called org.eclipse.rap.osgi.compat and is hosted in the RAP incubator repository [1]. The built version of the bundle can be downloaded from the build server [2] or the p2 repository [3]. The current version is compatible with Juno.

I've also wrote a blog article on the issue [1].

[1] http://git.eclipse.org/c/rap/incubator/org.eclipse.rap.incubator.interoperability.osgi.git/
[2] https://hudson.eclipse.org/hudson/job/rap-2.0-incubator-interoperability-osgi/
[3] http://download/rt/rap/incubator/nightly/interoperability.osgi/
[4] http://eclipsesource.com/blogs/2012/08/29/using-eclipse-databinding-with-felix/
Comment 7 Ralf Sternberg CLA 2012-08-29 07:22:56 EDT
I've opened bug 388319 to propose a core bundle that is independent from Equinox.
Comment 8 Ralf Sternberg CLA 2012-09-07 05:40:43 EDT
(In reply to comment #6)
> We've created a compatibility bundle that allows to run equinox.common
> outside of Equinox. This bundle exports the equinox.osgi packages that are
> needed by equinox.common.

It turned out that this bundle already exists and is called equinox.supplement. When this bundle is included together with equinox.common, JFace and JFace databinding is running fine on Felix.