Skip to content

Opening Spring Boot project in VSCode leads to StackOverflowError #1166

Closed

Description

@vbadev

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.:

image

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

  1. changed the title [-]Opening Spring Boot project leads to StackOverflowError[/-] [+]Opening Spring Boot project in VSCode leads to StackOverflowError[/+] on Jan 10, 2024
  2. BoykoAlex commented on Jan 10, 2024

    @BoykoAlex
    Contributor

    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)

  3. vbadev commented on Jan 11, 2024

    @vbadev
    Author

    Snapshot version works fine and no error is displayed. Thank you for your help!

  4. added
    for: eclipse
    for: vscode
    and removed on Jan 11, 2024
  5. added this to the 4.21.1.RELEASE milestone on Jan 11, 2024
  6. BoykoAlex commented on Jan 11, 2024

    @BoykoAlex
    Contributor

    No problem at all - thanks for bringing this up to us!!!

  7. abidsutisna commented on Jan 26, 2024

    @abidsutisna

    Thanksss!

  8. Strongbeard commented on Jun 12, 2024

    @Strongbeard

    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.

    Activating 'vscode-spring-boot' extension
    Trying to use "spring-boot.ls.java.home" value: ██████████/.sdkman/candidates/java/17.0.11-amzn
    Found java executable: ██████████/.sdkman/candidates/java/17.0.11-amzn/bin/java
    isJavaEightOrHigher => true
    Redirecting server logs to /dev/null
    Disabling server log output. No more output will be sent after this.
    [Error - 4:55:17 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(CompletableFuture.java:315)
    	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
    	at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
    	at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.lang.StackOverflowError
    	at org.eclipse.jdt.core.dom.TypeBinding.isClass(TypeBinding.java:1080)
    	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.getDirectSuperAnnotations(AnnotationHierarchies.java:54)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:90)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)
    	at org.springframework.ide.vscode.boot.java.annotations.AnnotationHierarchies.hasTransitiveSuperAnnotationType(AnnotationHierarchies.java:92)

    And here is the repeating lines from Extension Host (Remote) output:

    2024-06-12 16:55:17.211 [error] [vmware.vscode-spring-boot] provider FAILED
    2024-06-12 16:55:17.211 [error] Error: Internal error.
    	at handleResponse (██████████/.vscode-server/extensions/vmware.vscode-spring-boot-1.55.0/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)
    	at handleMessage (██████████/.vscode-server/extensions/vmware.vscode-spring-boot-1.55.0/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)
    	at processMessageQueue (██████████/.vscode-server/extensions/vmware.vscode-spring-boot-1.55.0/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)
    	at Immediate.<anonymous> (██████████/.vscode-server/extensions/vmware.vscode-spring-boot-1.55.0/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)
    	at process.processImmediate (node:internal/timers:478:21)
    
  9. BoykoAlex commented on Jun 13, 2024

    @BoykoAlex
    Contributor

    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)

  10. BoykoAlex commented on Jun 13, 2024

    @BoykoAlex
    Contributor

    Should be fixed in the snapshot or pre-release build. Polish commit: 0312d53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

for: eclipsefor: vscodetheme: validationtype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions