Closed
Description
In STS 4.22.1, occasionally, when opening a Maven project or importing/creating one, the following trace is logged as an error.
java.lang.NullPointerException: Cannot invoke "org.eclipse.m2e.core.project.IMavenProjectFacade.getArtifactKey()" because "facade" is null
at org.springframework.tooling.jdt.ls.commons.classpath.ClasspathUtil.createProjectBuild(ClasspathUtil.java:235)
at org.springframework.tooling.jdt.ls.commons.classpath.SendClasspathNotificationsJob.run(SendClasspathNotificationsJob.java:146)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I'm unsure what the impact of this error is.
To Reproduce
The error does not occur always, you may need multiple attempts of closing and opening a Maven project or creating one before you see it in the log.
It appears to be a race condition where the above code attempts to get Maven metadata before the Maven registry has fully processed the project (as it too is reacting to a new project being available in the workspace).