Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
Joshuahope opened this issue Jun 13, 2024 · 9 comments
Closed

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

Joshuahope opened this issue Jun 13, 2024 · 9 comments
Assignees
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: spring index & symbols type: bug

Comments

@Joshuahope
Copy link

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)

@martinlippert martinlippert added theme: spring index & symbols for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode and removed status: waiting-for-triage labels Jun 13, 2024
@martinlippert martinlippert added this to the 4.24.0.RELEASE milestone Jun 13, 2024
@martinlippert martinlippert self-assigned this Jun 13, 2024
martinlippert added a commit that referenced this issue Jun 13, 2024
@martinlippert
Copy link
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.

@Joshuahope
Copy link
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…

@martinlippert
Copy link
Member

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

@Joshuahope
Copy link
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.

@Joshuahope
Copy link
Author

learn.zip

@martinlippert
Copy link
Member

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

@martinlippert
Copy link
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)

@Joshuahope
Copy link
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.

@martinlippert
Copy link
Member

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

@BoykoAlex BoykoAlex modified the milestones: 4.24.0.RELEASE, 4.23.1 Jun 14, 2024
BoykoAlex pushed a commit that referenced this issue Jun 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: spring index & symbols type: bug
Projects
None yet
Development

No branches or pull requests

3 participants