UI required when launching mwe2 headlessly? [message #1404393] |
Thu, 31 July 2014 22:43 |
|
I'm trying to set up a headless configuration where I launch an mwe2 workflow. I'm not able to do so without involving a large number of UI plug-ins in my setup. The bundle marks them as optional but I get the exception below when I launch.
I know I can make it work by adding the UI bundles but I would like to avoid that. Is there some configuration option that can be set to avoid it?
java.lang.NoClassDefFoundError: org/eclipse/debug/ui/RefreshTab
at org.eclipse.emf.mwe2.launch.shortcut.Mwe2LaunchDelegate$1$1.run(Mwe2LaunchDelegate.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ClassNotFoundException: org.eclipse.debug.ui.RefreshTab cannot be found by org.eclipse.emf.mwe2.launch_2.6.0.v201405200939
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
|
|
|
|
Re: UI required when launching mwe2 headlessly? [message #1404421 is a reply to message #1404410] |
Fri, 01 August 2014 09:24 |
|
After checking the code I found this:
try {
org.eclipse.debug.ui.RefreshTab.refreshResources(configuration, monitor);
} catch (CoreException e) {
logger.error(e.getMessage(), e);
return Status.OK_STATUS;
} catch (Throwable t){
// In eclipse headless mode there are normally any ui bundles,
// just ignore auto refresh
logger.error(t.getMessage(), t);
return Status.OK_STATUS;
}
I will remove the error log statement. Maybe we should create launch.ui bundle, it would be better.
+Dennis Huebner
Get professional support from the Xtext committers at www.typefox.io
|
|
|
|
|
|
Re: UI required when launching mwe2 headlessly? [message #1404594 is a reply to message #1404445] |
Mon, 04 August 2014 11:18 |
|
Hi Lorenzo,
I'm using a brand new 'launch' actor that I just added to Buckminster so that I can express proper dependencies and prerequisites on the launch. It works just like the 'launch' command but can be specified in a cspec/cspex rather than in a command file.
I'm installing the bundle 'org.eclipse.emf.mwe2.launch' into my headless Buckminster. I've noticed that the error can be avoided by removing the following line from the launch configuration:
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${workspace}"/>
I don't really need that line since Buckminster does the refresh anyway so this is no longer a problem for me.
In general though, I think a design where UI and non-UI responsibilities are divided into separate bundles is worth enforcing at all times. Weird things happen when UI bundles are present in a headless build (workbench not started yet exceptions for instance) not to mention that downloading the full IDE when it's not needed for anything is less than ideal.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03929 seconds