Repository navigation
Description
Describe the bug
A clear and concise description of what the bug is.
Opening Spring Boot project is opened error message is shown from VSCode - Request textDocument/codeAction failed.:
Extension log file from Go to output button:
Activating 'vscode-spring-boot' extension
"spring-boot.ls.java.home" setting not specified or empty value
Found java executable: c:\Users<redacted>.vscode\extensions\redhat.java-1.25.1-win32-x64\jre\17.0.9-win32-x86_64\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:17:48 PM] Request textDocument/codeAction failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.StackOverflowError
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.StackOverflowError
at org.eclipse.jdt.core.dom.TypeBinding.isAnonymous(TypeBinding.java:1028)
at org.eclipse.jdt.core.dom.TypeBinding.getName(TypeBinding.java:704)
at org.eclipse.jdt.core.dom.TypeBinding.getQualifiedName(TypeBinding.java:837)
at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.getDirectSuperAnnotationBindings(AnnotationHierarchies.java:136)
at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.findTransitiveSuperAnnotationBindings(AnnotationHierarchies.java:157)
at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.lambda$findTransitiveSuperAnnotationBindings$4(AnnotationHierarchies.java:158)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.base/java.util.Collections$2.tryAdvance(Unknown Source)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(Unknown Source)
at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(Unknown Source)
at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(Unknown Source)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(Unknown Source)
at java.base/java.util.stream.Streams$ConcatSpliterator.tryAdvance(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
at java.base/java.util.Collections$2.tryAdvance(Unknown Source)
Last seven lines are repeated many times.
In Extension host log file these lines are also repeated many times:
2024-01-10 17:17:48.764 [error] [vmware.vscode-spring-boot] provider FAILED
2024-01-10 17:17:48.764 [error] Error: Internal error.
at handleResponse (c:\Users\ZZ02TY644.vscode\extensions\vmware.vscode-spring-boot-1.51.0\node_modules\vscode-jsonrpc\lib\common\connection.js:565:48)
at handleMessage (c:\Users\ZZ02TY644.vscode\extensions\vmware.vscode-spring-boot-1.51.0\node_modules\vscode-jsonrpc\lib\common\connection.js:345:13)
at processMessageQueue (c:\Users\ZZ02TY644.vscode\extensions\vmware.vscode-spring-boot-1.51.0\node_modules\vscode-jsonrpc\lib\common\connection.js:362:17)
at Immediate. (c:\Users\ZZ02TY644.vscode\extensions\vmware.vscode-spring-boot-1.51.0\node_modules\vscode-jsonrpc\lib\common\connection.js:334:13)
at process.processImmediate (node:internal/timers:476:21)
The project is based on spring boot 2.7.17, and only enabled extensions are Debugger for Java, Language Support for Java(TM) by Red Hat, Spring Boot Dashboard, Spring Boot Extension Pack, Spring Boot Tools and Spring Initializr Java Support.

Activity
[-]Opening Spring Boot project leads to StackOverflowError[/-][+]Opening Spring Boot project in VSCode leads to StackOverflowError[/+]BoykoAlex commentedon Jan 10, 2024
I hope this issue should be fixed with: d4cf735. Do you mind giving a snapshot build a try? To do so please download VSIX file for Spring Boot Tools from this page (see the bottom of the page): https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html. Then install the VSIX into the vscode via the extensions view (the
...in top right corner of the extensions section)If this doesn't help wonder if there is a project you can share that reproduces the issue... Also include the file name of the VSIX that you've installed.
(I think though that it should really work now)
vbadev commentedon Jan 11, 2024
Snapshot version works fine and no error is displayed. Thank you for your help!
BoykoAlex commentedon Jan 11, 2024
No problem at all - thanks for bringing this up to us!!!
abidsutisna commentedon Jan 26, 2024
Thanksss!
Strongbeard commentedon Jun 12, 2024
I believe this issue might have been reintroduced, or something that produces similar symptoms, in spring-boot-extension v1.55.0. Not sure about earlier versions. Here is the new stacktrace with personal info redacted. Repeating lines at the end are generated infinitely until it crashes.
And here is the repeating lines from
Extension Host (Remote)output:BoykoAlex commentedon Jun 13, 2024
Lets try this fix: f14172d
To do so please download VSIX file for Spring Boot Tools from this page (see the bottom of the page): https://cdn.spring.io/spring-tools/snapshot/STS4/nightly-distributions.html. Then install the VSIX into the vscode via the extensions view (the ... in top right corner of the extensions section)
BoykoAlex commentedon Jun 13, 2024
Should be fixed in the snapshot or pre-release build. Polish commit: 0312d53