Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363823

Summary: NPE at org.eclipse.m2e.core.ui.internal.editing.PomEdits.getChild(PomEdits.java:230)
Product: z_Archived Reporter: Jochen Stiepel <jochenstiepel>
Component: m2eAssignee: Milos Kleint <mkleint>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: igor, mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jochen Stiepel CLA 2011-11-15 08:45:19 EST
Version 1.1 from http://download.eclipse.org/technology/m2e/milestones/1.1
Download: 15.11.2011

java.lang.NullPointerException
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits.getChild(PomEdits.java:230)
	at org.eclipse.m2e.core.ui.internal.editing.LifecycleMappingOperation.process(LifecycleMappingOperation.java:62)
	at org.eclipse.m2e.core.ui.internal.editing.PomEdits.performOnDOMDocument(PomEdits.java:403)
	at org.eclipse.m2e.editor.xml.internal.lifecycle.LifecycleMappingProposal.performIgnore(LifecycleMappingProposal.java:96)
	at org.eclipse.m2e.editor.xml.internal.lifecycle.LifecycleMappingProposal.apply(LifecycleMappingProposal.java:69)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:933)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:879)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$27(CompletionProposalPopup.java:875)
	at org.eclipse.jface.text.contentassist.CompletionProposalPopup$5.widgetDefaultSelected(CompletionProposalPopup.java:657)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:119)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	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:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	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.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1384)
Comment 1 Milos Kleint CLA 2011-12-22 07:09:57 EST
Any steps to reproduce?

from initial evaluation, the problem lies in the fact that the IDOMModel's Document returns null in the getDocumentElement() method. For your particular document at the particular point in time. The null value is currently not handled and I would rather not include such check (which would render the whole editing operation a noop) without an understanding of the condition that arose here..
Comment 2 Jochen Stiepel CLA 2011-12-28 06:04:36 EST
Sorry. I don't have any step's to reproduce this.
Comment 3 Igor Fedorenko CLA 2012-01-25 17:18:17 EST
@Milos do you still plan to work on this for Juno M5 (which is next week, Friday, February 03, 2012)?
Comment 4 Igor Fedorenko CLA 2012-01-30 16:08:53 EST
Removing target milestone. I assume 'Juno M5' milestone was set by accident.
Comment 5 Igor Fedorenko CLA 2012-05-21 10:37:15 EDT
Closing old/stale bugreports.
Comment 6 Denis Roy CLA 2021-04-19 13:22:01 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/