Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » org.eclipse.ui import missing in single-sourced RAP & RCP bundle(Single-sourcing fails because of org.eclipse.ui import even with org.eclipse.rap.ui as a required bundle)
org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908514] Wed, 05 September 2012 14:04 Go to next message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
I'm running into a problem with an RCP bundle that I am trying to use with RAP for single-sourcing. I have included org.eclipse.rap.ui and org.eclipse.ui as optional required bundles and I am importing org.eclipse.ui. The framework can not resolve the import on org.eclipse.ui and give the following error (minus the whole stacktrace):

!ENTRY gov.ornl.nice.client.eclipse.widgets 4 0 2012-09-05 09:47:34.187
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: The bundle "gov.ornl.nice.client.eclipse.wid
gets_2.0.0 [109]" could not be resolved. Reason: Missing Constraint: Import-Pack
age: org.eclipse.ui; version="0.0.0"
at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(Abs
tractBundle.java:1332)

Removing org.eclipse.ui from the imported packages list results in the same failure, but for org.eclipse.ui.dialogs, which is also included. I have attached my manifest file below, for reference.

I could remove all of the org.eclipse.ui imports from the list, but this causes my Maven+Tycho build to fail.

Any thoughts? I have a feeling that I am missing something simple given the number of single-sourcing articles out there.

Jay

----- MANIFEST.MF -----

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: NiCEEclipseWidgets
Bundle-SymbolicName: gov.ornl.nice.client.eclipse.widgets;singleton:=true
Bundle-Version: 2.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: gov.ornl.nice.nicedatastructures;bundle-version="2.0.0",
gov.ornl.nice.jme3engine;bundle-version="3.0.0",
org.eclipse.ui;resolution:=optional,
org.eclipse.rap.ui;bundle-version="1.5.0";resolution:=optional
Import-Package: gov.ornl.nice.client.iniceclient,
gov.ornl.nice.client.iniceclient.uiwidgets,
org.eclipse.core.commands.common,
org.eclipse.core.resources,
org.eclipse.core.runtime;version="3.4.0",
org.eclipse.core.runtime.jobs,
org.eclipse.jface.action,
org.eclipse.jface.databinding.swt,
org.eclipse.jface.dialogs,
org.eclipse.jface.resource,
org.eclipse.jface.viewers,
org.eclipse.jface.window,
org.eclipse.swt,
org.eclipse.swt.awt,
org.eclipse.swt.browser,
org.eclipse.swt.custom,
org.eclipse.swt.dnd,
org.eclipse.swt.events,
org.eclipse.swt.graphics,
org.eclipse.swt.layout,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.eclipse.ui.dialogs,
org.eclipse.ui.forms,
org.eclipse.ui.forms.editor,
org.eclipse.ui.forms.events,
org.eclipse.ui.forms.widgets,
org.eclipse.ui.ide,
org.eclipse.ui.internal.util,
org.eclipse.ui.part,
org.osgi.framework;version="1.6.0"
Export-Package: gov.ornl.nice.client.eclipse.widgets,
gov.ornl.nice.client.eclipse.widgets.geometry
Service-Component: OSGI-INF/eclipseWidgetsComponent.xml


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908522 is a reply to message #908514] Wed, 05 September 2012 14:18 Go to previous messageGo to next message
Gianluca Chiodaroli is currently offline Gianluca ChiodaroliFriend
Messages: 7
Registered: September 2012
Junior Member
Tycho don't support resolution:=optional, when i build with Tycho i remove resolution:=optional.

If you launch your application from Eclipse be sure to include org.eclipse.ui or org.eclipse.rap.ui in your debug configuration

Bye
Gianluca
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908528 is a reply to message #908522] Wed, 05 September 2012 14:25 Go to previous messageGo to next message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
Gianluca,

Thanks for your response!

I'll look into the problem with the Tycho build with the Tycho folks. I was under the impression that having org.eclipse.rap.ui in the target and the imports on the MANIFEST.MF file would satisfy their needs. Our build runs hourly, so I'm not sure how I can switch between the optional resolution and non-optional resolution, although a fragment might work for this.

Gianluca Chiodaroli wrote on Wed, 05 September 2012 10:18

If you launch your application from Eclipse be sure to include org.eclipse.ui or org.eclipse.rap.ui in your debug configuration


I have org.eclipse.rap.ui included in my launch configuration. Is that what you mean by "debug configuration?" I don't normally run it in debug mode unless I need the debugger.

Jay


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908536 is a reply to message #908528] Wed, 05 September 2012 14:35 Go to previous messageGo to next message
Gianluca Chiodaroli is currently offline Gianluca ChiodaroliFriend
Messages: 7
Registered: September 2012
Junior Member
Jay Billings wrote on Wed, 05 September 2012 10:25

Our build runs hourly, so I'm not sure how I can switch between the optional resolution and non-optional resolution, although a fragment might work for this.

I use Jenkins and before start the maven build i overwrite the MANIFEST.MF with a purged one that i store in a deploy directory

[/quote]
Jay Billings wrote on Wed, 05 September 2012 10:25

I have org.eclipse.rap.ui included in my launch configuration. Is that what you mean by "debug configuration?" I don't normally run it in debug mode unless I need the debugger.

Yes debug or launch.

Those are the plugin/bundles that i include:

com.ibm.icu.base
javax.servlet
org.apache.commons.fileupload
org.apache.commons.io
default,org.eclipse.core.commands
org.eclipse.core.contenttype
org.eclipse.core.databinding.beans
org.eclipse.core.databinding.observable
org.eclipse.core.databinding.property
org.eclipse.core.databinding
org.eclipse.core.expressions
org.eclipse.core.jobs
org.eclipse.core.runtime
org.eclipse.equinox.app
org.eclipse.equinox.common
org.eclipse.equinox.ds
org.eclipse.equinox.http.jetty
org.eclipse.equinox.http.registry
org.eclipse.equinox.http.servlet
org.eclipse.equinox.preferences
org.eclipse.equinox.registry
org.eclipse.equinox.servletbridge.extensionbundle
org.eclipse.equinox.util
org.eclipse.help
org.eclipse.jetty.continuation
org.eclipse.jetty.http
org.eclipse.jetty.io
org.eclipse.jetty.security
org.eclipse.jetty.server
org.eclipse.jetty.servlet
org.eclipse.jetty.util
org.eclipse.osgi.services
org.eclipse.osgi
org.eclipse.rap.jface.databinding
org.eclipse.rap.jface
org.eclipse.rap.rwt.osgi
org.eclipse.rap.rwt.supplemental.filedialog
org.eclipse.rap.rwt.supplemental.fileupload
org.eclipse.rap.rwt
org.eclipse.rap.ui.forms
org.eclipse.rap.ui.views
org.eclipse.rap.ui.workbench
org.eclipse.rap.ui
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908544 is a reply to message #908536] Wed, 05 September 2012 14:49 Go to previous messageGo to next message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
Gianluca,

Thanks! I'll give that build strategy a try with Hudson.

I think I have the same packages included in my configuration. Could you post a link to or post the contents of your MANIFEST.MF file? I am curious to see how you are handling require-bundle vs. import-package statements.

Jay


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908553 is a reply to message #908544] Wed, 05 September 2012 14:59 Go to previous messageGo to next message
Gianluca Chiodaroli is currently offline Gianluca ChiodaroliFriend
Messages: 7
Registered: September 2012
Junior Member
I follow the advice in this guide: eclipsesource.com/en/eclipse/eclipse-rap-overview/

I create a plugin called platform.compatibility with this MANIFES:MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: platform.compatibility
Bundle-SymbolicName: platform.compatibility;singleton:=true
Bundle-Version: 1.0.0.qualifier
Eclipse-BuddyPolicy: registered
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,3.8.1]";visibility:=reexport,
 org.eclipse.rap.ui;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.ui.forms;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.ui.views;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.ui.workbench;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.rwt.supplemental.filedialog;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.rwt.supplemental.fileupload;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.rap.jface;bundle-version="1.5.0";resolution:=optional;visibility:=reexport,
 org.eclipse.ui;bundle-version="3.5.2";resolution:=optional;visibility:=reexport,
 org.eclipse.ui.forms;bundle-version="3.5.2";resolution:=optional;visibility:=reexport,
 org.eclipse.jface.text;bundle-version="3.6.1";resolution:=optional;visibility:=reexport,
 org.eclipse.jface;bundle-version="3.6.1";resolution:=optional;visibility:=reexport,
 org.eclipse.ui.console;bundle-version="[3.5.0,3.6.0]";resolution:=optional;visibility:=reexport
Bundle-RequiredExecutionEnvironment: JavaSE-1.6


and then i use it in my bundles

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: platform.ui
Bundle-SymbolicName: platform.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: xxx.uiutils
Eclipse-BuddyPolicy: registered
Require-Bundle: platform.compatibility,
 objectmodel;bundle-version="1.0.0"
Bundle-Activator: xxx.Activator
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .


Hope it helps
Gianluca
Re: org.eclipse.ui import missing in single-sourced RAP & RCP bundle [message #908562 is a reply to message #908553] Wed, 05 September 2012 15:10 Go to previous message
Jay Billings is currently offline Jay BillingsFriend
Messages: 54
Registered: July 2011
Member
Thanks Gianluca! This gives me some things to try and is very helpful!

Jay


Jay Jay Billings
Oak Ridge National Laboratory
Twitter: @jayjaybillings
Previous Topic:RAP and fragment
Next Topic:Refreshing RWT standalone throws exception
Goto Forum:
  


Current Time: Tue Apr 23 16:17:22 GMT 2024

Powered by FUDForum. Page generated in 0.03308 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top