You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to view beans for multiple modules in version v1.55 #1271
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)
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.
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.
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)
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.
Activity
GH-1271: check for non-existing expressions or non-resolvable types d…
martinlippert commentedon Jun 13, 2024
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 commentedon Jun 13, 2024
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 commentedon Jun 13, 2024
@Joshuahope Looks like the upload of that file didn't work out. Can you try again? That would be great!
Joshuahope commentedon Jun 14, 2024
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 commentedon Jun 14, 2024
learn.zip
martinlippert commentedon Jun 14, 2024
Thanks for attaching the sample project, but unfortunately it doesn't seem to reproduce the exception on my side...
martinlippert commentedon Jun 14, 2024
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 commentedon Jun 14, 2024
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 commentedon Jun 14, 2024
Awesome, thanks for giving the pre-release a try. Closing this now.
GH-1271: check for non-existing expressions or non-resolvable types d…