Description
Describe the bug
I try to use the VS Code extension for an update of an outdated Spring Boot project that's on 2.7.7. When I try to update either to the latest 2.7 patch version or the latest major version 3.1.5, it fails with an exception like this:
Activating 'vscode-spring-boot' extension
Trying to use "spring-boot.ls.java.home" value: c:\Program Files\Java\jdk-17
Found java executable: c:\Program Files\Java\jdk-17\bin\java.exe
isJavaEightOrHigher => true
Redirecting server logs to /dev/null
Disabling server log output. No more output will be sent after this.
[Error - 5:29:37 PM] Request workspace/executeCommand failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.ClassCastException: Cannot cast org.openrewrite.tree.ParseError to org.openrewrite.java.tree.J$CompilationUnit
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1159)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760)
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)
Caused by: java.lang.ClassCastException: Cannot cast org.openrewrite.tree.ParseError to org.openrewrite.java.tree.J$CompilationUnit
at java.base/java.lang.Class.cast(Class.java:3889)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.springframework.ide.vscode.commons.rewrite.java.ProjectParser.parseModule(ProjectParser.java:68)
at org.springframework.ide.vscode.commons.rewrite.java.ProjectParser.parse(ProjectParser.java:50)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRecipeRepository.computeWorkspaceEdit(RewriteRecipeRepository.java:370)
at org.springframework.ide.vscode.boot.java.rewrite.RewriteRecipeRepository.lambda$apply$18(RewriteRecipeRepository.java:331)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
... 8 more
OS: Win10, VS Code 1.84.1
Spring Boot Tools 1.50.0
I've set "spring-boot.ls.java.home" to a JDK 17 path in the settings.json.
Maybe there's something weird with this project, but I've no idea what to make of this error.