Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors running builder 'Maven Project Builder' on project 'project-name' ("facade" is null) #3483

Closed
robert-blankenship opened this issue Feb 1, 2024 · 2 comments

Comments

@robert-blankenship
Copy link

robert-blankenship commented Feb 1, 2024

Unable to use any Java language features in VS Code.

Contains: Errors running builder 'Maven Project Builder' on project 'project-name'.
java.lang.NullPointerException: Cannot invoke "org.eclipse.m2e.core.internal.project.registry.MavenProjectFacade.getPom()" because "facade" is null
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.lambda$11(ProjectRegistryManager.java:799)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.readMavenProjectFacades(ProjectRegistryManager.java:760)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:392)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:366)
	at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:318)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.getProjectFacade(MavenBuilder.java:146)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.lambda$0(MavenBuilder.java:84)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:394)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:275)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:214)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:83)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:192)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:1077)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:296)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:352)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:441)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:444)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:555)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:503)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:585)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:594)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:483)
	at org.eclipse.jdt.ls.core.internal.handlers.BuildWorkspaceHandler.buildWorkspace(BuildWorkspaceHandler.java:65)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$27(JDTLanguageServer.java:988)
	at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$59(JDTLanguageServer.java:1216)
	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
	at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Environment
  • Operating System: OSX 14.2.1
  • JDK version: OpenJDK 17
  • Visual Studio Code version: 1.86.0
  • Java extension version:
    • v1.27.0 (Language support for Java(TM) by Red Hat)
    • v0.25.15 (Extension Pack for Java)
Steps To Reproduce
  1. Run mvn eclipse:clean to delete .project, .settings/ and .classpath files at project and module levels. Clean Java Language Server workspace and restart VS Code.
  2. Start VS code.
Current Result

No java language features are working, such as "Go To References". Maven reload does not work, project build does not work.

Expected Result

Java language features should be working.

Additional Informations

Settings:

    "java.jdt.ls.java.home": "/usr/local/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home",
    "java.import.generatesMetadataFilesAtProjectRoot": true,

Running mvn install from the command line works fine.

My project has a root POM in a remote repo. There are several child <modules>, each with their own pom.xml

project-name/
  pom.xml
  module1/
    pom.xml
  module2/
    pom.xml
  module3/
    pom.xml
@robert-blankenship robert-blankenship changed the title Errors running builder 'Maven Project Builder' on project 'project-name' Errors running builder 'Maven Project Builder' on project 'project-name' ("facade" is null) Feb 1, 2024
@snjeza
Copy link
Contributor

snjeza commented Feb 3, 2024

@robert-blankenship Could you attach your project or pom.xml files?

@robert-blankenship
Copy link
Author

@snjeza Sorry for the delay. I haven't forgotten about it.

It will take some time for me to create a clean project that reproduces the issue.

@robert-blankenship robert-blankenship closed this as not planned Won't fix, can't repro, duplicate, stale Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants