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

Bug 340194

Summary: NPE in import wizard
Product: z_Archived Reporter: Igor Fedorenko <igor>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Igor Fedorenko CLA 2011-03-16 13:21:45 EDT
I get the following NPE when importing tycho projects using fresh/clean m2e+m2e-tycho installation on a brand new virtual machine, i.e. with empty local repository. 

A workaround is to close the import wizard and open it again (no need to restart anything)




2011-03-16 13:17:22,869 [main] ERROR o.e.m.c.u.i.w.MavenImportWizardPage - Scanning error [/var/tmp/eclipsecon2011/tycho-demo/exercises/Exercise_05_Solution]; java.lang.NullPointerException
java.lang.NullPointerException: null
        at java.util.HashMap.putAll(HashMap.java:498) ~[na:1.6.0_24]
        at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard.discoverProposals(MavenImportWizard.java:244) ~[org.eclipse.m2e.core.ui_0.13.0.201103151729.jar:na]
        at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard.scanProjects(MavenImportWizard.java:222) ~[org.eclipse.m2e.core.ui_0.13.0.201103151729.jar:na]
        at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizardPage$12.run(MavenImportWizardPage.java:352) ~[org.eclipse.m2e.core.ui_0.13.0.201103151729.jar:na]
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) ~[org.eclipse.jface_3.7.0.I20110309-1300.jar:na]
Comment 1 Milos Kleint CLA 2011-03-21 10:26:22 EDT
i've experienced it during fixing of issue 338804

http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=11d77c64ab8b97b6d4c664f067c5cd4004986f39

the problem was that a non-resolved project was added to the selectedprojects list in the calculate() method. I've changed it to only select projects that are positively correct (MavenProject exists and no exception at calculation) haven't seen the problem since.
Comment 2 Denis Roy CLA 2021-04-19 13:22:51 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/