Skip to content

Unable to view beans for multiple modules in version v1.55 #1271

Closed

Description

@Joshuahope

Version: v1.55 Environment:
OS: Windows
JDK: 21
SpringBoot: 2.1.18.RELEASE
Steps to Reproduce:
Open a multi-module project in VSCode.
After the build is complete, unable to view all beans for the second module.
Expected Result: Expected to see all beans for the second module in the Spring Boot Tools extension.

Actual Result: The Spring Boot Tools extension only shows beans for the first module and fails to display beans for the second module. There are no error messages displayed in the UI, but the functionality is not working as expected.

Additional Information:
The issue does not occur in version v1.54, where beans for multiple modules are visible.
There might be a regression in the latest version that affects the display of beans in multi-module projects.

Error Message:
ERROR o.s.i.v.boot.app.SpringSymbolIndex - {}
java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.core.dom.Expression.resolveTypeBinding()" because the return value of "org.eclipse.jdt.core.dom.ReturnStatement.getExpression()" is null
at org.springframework.ide.vscode.boot.java.reconcilers.PreciseBeanTypeReconciler$1.visit(PreciseBeanTypeReconciler.java:119)
at org.springframework.ide.vscode.boot.java.reconcilers.CompositeASTVisitor.visit(CompositeASTVisitor.java:174)
at org.eclipse.jdt.core.dom.ReturnStatement.accept0(ReturnStatement.java:126)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3269)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3340)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:128)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3269)

Activity

  1. added
    for: eclipse
    for: vscode
    and removed on Jun 13, 2024
  2. added this to the 4.24.0.RELEASE milestone on Jun 13, 2024
  3. added a commit that references this issue on Jun 13, 2024
  4. martinlippert commented on Jun 13, 2024

    @martinlippert
    Member

    Should be fixed with 349a395.

    But it would be interesting to see under which exact circumstances this happens. It looks like the reconciler has issues with a specific return statement of a bean method. Would it be possible to share the project that causes the issue or the bean method definitions? Or to identify which bean method causes the problem and share only that specific piece with us?

    Since the error appears to happen during reconciling, this error should happen every time you change the specific file, so maybe you can identify the specific file that way. That would be awesome.

  5. Joshuahope commented on Jun 13, 2024

    @Joshuahope
    Author

    I am unable to provide the entire project as it is my work project, but I can provide the file that is causing this issue.
    Uploading TotInvoiceSettlementProgressServiceImpl.txt…

  6. martinlippert commented on Jun 13, 2024

    @martinlippert
    Member

    @Joshuahope Looks like the upload of that file didn't work out. Can you try again? That would be great!

  7. Joshuahope commented on Jun 14, 2024

    @Joshuahope
    Author

    I have extracted all the contents of the incorrect class into a separate test project, but the same problem still occurs. I can provide all the contents of this test project.

  8. Joshuahope commented on Jun 14, 2024

    @Joshuahope
    Author
  9. martinlippert commented on Jun 14, 2024

    @martinlippert
    Member

    Thanks for attaching the sample project, but unfortunately it doesn't seem to reproduce the exception on my side...

  10. martinlippert commented on Jun 14, 2024

    @martinlippert
    Member

    You could try the pre-release version just by switching to that from the Spring Boot Tools extension page in your VSCode installation to see if the fix that I put in place works for you (in addition to us to identify the scenario in which this error appears)

  11. Joshuahope commented on Jun 14, 2024

    @Joshuahope
    Author

    I switched to the pre-release branch and cleared the cache for all projects, and the issue hasn’t appeared again. Thank you for helping to resolve this issue.

  12. martinlippert commented on Jun 14, 2024

    @martinlippert
    Member

    Awesome, thanks for giving the pre-release a try. Closing this now.

  13. added a commit that references this issue on Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetheme: spring index & symbolstype: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions