Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » (no subject)
(no subject) [message #687827] Thu, 23 June 2011 09:52
Koen Aers is currently offline Koen AersFriend
Messages: 16
Registered: July 2009
Junior Member
Hi,

I launching a Java application using the
org.eclipse.debug.core.ILaunchConfiguration.launch(...). When trying to
test this piece of code in a JUnit test I get a green result.


However, I also get the following nasty exception:

org.eclipse.core.runtime.CoreException: Plug-in org.eclipse.debug.ui was
unable to load class org.eclipse.debug.internal.ui.sourcelookup.Prompter.
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:176)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at
org.eclipse.debug.core.DebugPlugin.getStatusHandler(DebugPlugin.java:584)
at
org.eclipse.debug.core.model.LaunchConfigurationDelegate.saveBeforeLaunch(LaunchConfigurationDelegate.java:252)
at
org.eclipse.debug.core.model.LaunchConfigurationDelegate.preLaunchCheck(LaunchConfigurationDelegate.java:208)
at
org.eclipse.jdt.launching.AbstractJavaLaunchConfigurationDelegate.preLaunchCheck(AbstractJavaLaunchConfigurationDelegate.java:921)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:809)



This exception is apparently caused by the fact that there is no workbench:

Caused by: java.lang.IllegalStateException: Workbench has not been
created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:92)
at
org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager.startup(LaunchingResourceManager.java:546)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.getLaunchingResourceManager(DebugUIPlugin.java:306)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.start(DebugUIPlugin.java:507)


It seems that the launch configuration is trying to start the
DebugUIPlugin. Is there any reason for this dependency on UI code?

By the way, I was able to suppress the exception by embedding the test
code in a UIJob, but I think it is a pity I have to add this dependency
on org.eclipse.ui.workbench for no apparent reason.

Can somebody enlighten me?

Cheers,
Koen
Previous Topic:delete perspective
Next Topic:installing new software in background
Goto Forum:
  


Current Time: Tue Mar 19 03:58:30 GMT 2024

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

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

Back to the top