You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
That's quite a change! I have also run into the following NPE occasionally - it occurs only once per session; again, appears to be a race condition. Would this also be fixed by the GAV rework? Please let me know if I should file another issue.
!MESSAGE NullPointerException: Cannot invoke "org.springsource.ide.eclipse.commons.livexp.core.LiveSetVariable.getValue()" because "this.this$0.applications" is null
!STACK 0
java.lang.NullPointerException: Cannot invoke "org.springsource.ide.eclipse.commons.livexp.core.LiveSetVariable.getValue()" because "this.this$0.applications" is null
at org.springframework.ide.eclipse.boot.dash.model.LocalBootDashModel$2.bundleChanged(LocalBootDashModel.java:157)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:972)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:341)```
Activity
BoykoAlex commentedon Jun 4, 2024
Rework of how GAV are computed for projects pushed in with: ba6fc2a Should fix the NPE reported here.
brianvfernandes commentedon Jun 4, 2024
That's quite a change! I have also run into the following NPE occasionally - it occurs only once per session; again, appears to be a race condition. Would this also be fixed by the GAV rework? Please let me know if I should file another issue.
BoykoAlex commentedon Jun 4, 2024
No the NPE above is not related to GAVs. It is a straight-forward NPE fix: 6de76d8