Repository navigation
Closed
Labels
Milestone
Description
I came across this exception showing up in the log output of the language server:
2023-11-08T15:26:08.628+01:00 ERROR 87055 --- [ct-Reconciler-1] o.s.i.v.b.v.BootVersionValidationEngine : Failed validating Spring Project version
java.lang.Exception: Unable to find build file in project while computing version validation for: spring-petclinic
at org.springframework.ide.vscode.boot.validation.generations.ProjectVersionDiagnosticProvider.getDiagnostics(ProjectVersionDiagnosticProvider.java:43) ~[classes/:na]
at org.springframework.ide.vscode.boot.validation.BootVersionValidationEngine.reconcile(BootVersionValidationEngine.java:50) ~[classes/:na]
at org.springframework.ide.vscode.boot.common.ProjectReconcileScheduler.lambda$3(ProjectReconcileScheduler.java:85) ~[classes/:na]
at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[na:na]
at org.springframework.ide.vscode.boot.common.ProjectReconcileScheduler.lambda$2(ProjectReconcileScheduler.java:83) ~[classes/:na]
at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onNext(MonoPeekTerminal.java:171) ~[reactor-core-3.5.11.jar:3.5.11]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onNext(FluxOnAssembly.java:539) ~[reactor-core-3.5.11.jar:3.5.11]
at reactor.core.publisher.MonoPublishOn$PublishOnSubscriber.run(MonoPublishOn.java:181) ~[reactor-core-3.5.11.jar:3.5.11]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.5.11.jar:3.5.11]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.5.11.jar:3.5.11]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
It showed up while starting things up in VSCode and the same exception was thrown for all three projects that I had in the workspace. No idea how to reproduce this though, but I hope the exception itself can give us a hit what to do about this.
Activity
martinlippert commentedon Nov 9, 2023
The projects definitely have build files included, like
pom.xmlBoykoAlex commentedon Nov 28, 2023
Exception -> Warning in the log with 7210c50
martinlippert commentedon Nov 29, 2023
Ok, I think I found a way to reproduce this issue, using the latest VSCode + the Spring Tools switched to pre-release.
More...at the bottom of the walkthrough sectionThe above mentioned exception will appear in the log.
I have the Gradle extension from Microsoft installed as well and selected the Gradle Build Server approach to be used in the preferences, in case this makes a difference (Preferences -> Extensions -> Gradle -> Build Server:enabled)
BoykoAlex commentedon Nov 29, 2023
@martinlippert thanks very much for the steps. Seems like the key part of this the Gradle extension from MS as it doesn't seem to create the container classpath entry to keep dependencies which Buildship or M2E creates. I've added a somewaht naive logic to determine Maven vs Gradle project for the case of the missing container CPE: 9478964. Seems to work.