Eclipse - cannot delete a project from the workspace. NPE

I can not delete the project from the workspace. Eclipse throws NPE and I have NFI how to solve this problem.

 java.lang.NullPointerException at org.eclipse.ltk.ui.refactoring.resource.DeleteResourcesWizard $ DeleteResourcesRefactoringConfigurationPage.createControl (DeleteResourcesWizard.java:89) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizard : 631) at org.eclipse.jface.window.Window.create (Window.java:431) at org.eclipse.jface.dialogs.Dialog.create (Dialog.java:1089) at org.eclipse.ltk.ui. refactoring.RefactoringWizardOpenOperation $ 1.run (RefactoringWizardOpenOperation.java:171) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:70) at org.eclipse.ltk.ui.refactoring.Ofactory : 192) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run (RefactoringWizardOpenOperation.java:115) at org.eclipse.ltk.internal.ui.refactoring.actions.DeleteResourcesHandler.execute (DeleteResourcesHandler.java: org.eclipse.ui.internal.handlers.HandlerProxy.execute (H  andlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks (Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks (ParameterizedCommand.java:508) at org.eclipse.ui .internal.handlers.HandlerService.executeCommandInContext (HandlerService.java:270) at org.eclipse.ui.internal.ide.actions.LTKLauncher.runCommand (LTKLauncher.java:95) at org.eclipse.ui.internal.ide.actions .LTKLauncher.openDeleteWizard (LTKLauncher.java:47) at org.eclipse.ui.actions.DeleteResourceAction.run (DeleteResourceAction.java:481) at org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteAction.run (Delete .java: 162) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:250) at org. eclipse.jface.action.Action.runWithEvent (Action.java:498) at org.eclipse.jface.commands.ActionHandler.execute (ActionHandler.java:119) at org.eclipse.core.commands.C  ommand.executeWithChecks (Command.javarige76) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks (ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand (Handler16er) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand (WorkbenchKeyboard.java:468) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press (WorkbenchKeyboard.java:786) at org.eclipse.ui.internal .keys.WorkbenchKeyboard.processKeyEvent (WorkbenchKeyboard.java:885) at org.eclipse.ui.internal.keys.OutOfOrderListener.handleEvent (OutOfOrderListener.java:76) at org.eclipse.swt.widgets.EventTable EventJetTable : 84) at org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1258) at org.eclipse.swt.widgets.Widget.sendEvent (Widget.java:1282) at org.eclipse.swt.widgets. Widget.sendEvent (Widget.java:1267) at org.eclipse.swt.widgets.Widget.sendKeyEvent (Widget.java:1294) at org.eclipse.swt.widgets.Widget.gtk_key_press_event (Widget.java:730) at org .eclipse.  swt.widgets.Control.gtk_key_press_event (Control.java:2841) at org.eclipse.swt.widgets.Composite.gtk_key_press_event (Composite.java:734) at org.eclipse.swt.widgets.Tree.gtk_key_press_event (Treejava 1977) at org.eclipse.swt.widgets.Widget.windowProc (Widget.java:1743) at org.eclipse.swt.widgets.Control.windowProc (Control.java:4796) at org.eclipse.swt.widgets.Tree .windowProc (Tree.javahaps485) at org.eclipse.swt.widgets.Display.windowProc (Display.java:4360) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event (Native Method) at org.eclipse .swt.internal.gtk.OS.gtk_main_do_event (OS.java:8189) at org.eclipse.swt.widgets.Display.eventProc (Display.java:1238) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration (Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration (OS.java:2237) at org.eclipse.swt.widgets.Display.readAndDispatch (Display.javahaps1515) at org.eclipse.ui .internal.Workbench.runEventLoop (Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI (Workbench.  java: 2604) at org.eclipse.ui.internal.Workbench.access $ 4 (Workbench.java:2438) at org.eclipse.ui.internal.Workbench $ 7.run (Workbench.java:671) at org.eclipse.core .databinding.observable.Realm.runWithDefault (Realm.java{3232) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkWork.unbunorkwork ) at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run (EclipseAppHandle.java:196) at org.eclipse. core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.javalseime at. org adapter.EclipseStarter.run (EclipseStarter.javahaps69) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reff. Nativemetho  dAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke (Method.javahaps97) at org.eclip.e.e .Main.invokeFramework (Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun (Main.java∗75) at org.eclipse.equinox.launcher.Main.run (Main.java:1408) at org.eclipse.equinox.launcher.Main.main (Main.java:1384) 

and this is my environment: -

  eclipse.buildId = M20110210-1200
 java.version = 1.6.0_21
 java.vendor = Sun Microsystems Inc.
 BootLoader constants: OS = linux, ARCH = x86, WS = gtk, NL = en_AU
 Framework arguments: -product org.eclipse.epp.package.jee.product
 Command-line arguments: -os linux -ws gtk -arch x86 -product 
 org.eclipse.epp.package.jee.product
+4
source share
4 answers

Associated Eclipse Error 345477 . This post mentions some ia32-libs errors. The suggested workaround in this error does the following before executing Eclipse:

export GDK_PIXBUF_MODULE_FILE=/usr/lib32/gdk-pixbuf-2.0/2.10.0/loaders.cache 

I can confirm that this works, even with the Ubuntu-Mono-Light icon installed. I am using Eclipse 32 bit on Java 32 bit on Ubuntu 11.04 64 bit.

+4
source

I noticed the same problem using Eclipse 3.6 SR2 on Ubuntu 11.04. It works great, however, on Ubuntu 10.04 and Windows 7, using the same version of Eclipse. NullPointerException comes from line 89 of DeleteResourcesWizard , because image is null :

 87 Image image= parent.getDisplay().getSystemImage(SWT.ICON_QUESTION); 88 Label imageLabel = new Label(composite, SWT.NULL); 89 imageLabel.setBackground(image.getBackground()); 

The quick fix I found for Ubuntu 11.04 is to use a different theme (e.g. Clearlooks) or a set of icons (e.g. GNOME). The default theme that doesn't work for me is Ambiance, which by default matches the Ubuntu-Mono-Dark icon. I assume that it should be missing the icon (or it has been renamed) needed for SWT.ICON_QUESTION , and Eclipse does not gracefully cope with not finding it.

+1
source

The nearest bug ( issue 302791 ) was fixed in 3.6 (which, as I suspect, you have with build ID M20110210-1200)

Your error seems to occur at the very beginning of the process, since it cannot create the `DeleteResourcesWizard.
This may be due to:

  • some strange choice (did you try to select the project in the package explorer? in the resource explorer?)
  • some remote resources still referencing the project.

If you can reproduce the problem every time, it might be worth the new Eclipse error report.

0
source

Thanks, I changed my icon set to GNOME and it will work! Ubuntu 11.04 is the worst Ubuntu ever! It looks like Ubuntu aims to be like Windows ME and Vista ...

0
source

All Articles