Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

An error "fullyQualified" is null happened when generating boot-2.7-3.0-upgrade-report #478

Closed
JoeWang1127 opened this issue Oct 11, 2022 · 4 comments · Fixed by #480
Closed
Labels
3.0.0 Spring Boot 3.0.0 type: bug Something isn't working upgrade:boot-report
Milestone

Comments

@JoeWang1127
Copy link

Describe the bug
When running apply boot-2.7-3.0-upgrade-report command, I got the following error:
Action [SpringBoot30UpgradeReport] 'Create report' failed: Cannot invoke "org.openrewrite.java.tree.JavaType$FullyQualified.getFullyQualifiedName()" because "fullyQualified" is null Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.

To Reproduce
Steps to reproduce the behavior:

  1. scan the project.
  2. run apply boot-2.7-3.0-upgrade-report.

Expected behavior
The report should be generated.

Stacktrace
org.springframework.sbm.engine.recipe.ActionFailedException: Action [SpringBoot30UpgradeReport] 'Create report' failed: Cannot invoke "org.openrewrite.java.tree.JavaType$FullyQualified.getFullyQualifiedName()" because "fullyQualified" is null at org.springframework.sbm.engine.recipe.Action.applyWithStatusEvent(Action.java:43) at org.springframework.sbm.engine.recipe.Recipe.apply(Recipe.java:101) at org.springframework.sbm.engine.commands.ApplyCommand.execute(ApplyCommand.java:61) at org.springframework.sbm.shell.ApplyShellCommand.apply(ApplyShellCommand.java:61) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.shell.command.invocation.InvocableShellMethod.doInvoke(InvocableShellMethod.java:306) at org.springframework.shell.command.invocation.InvocableShellMethod.invoke(InvocableShellMethod.java:232) at org.springframework.shell.command.CommandExecution$DefaultCommandExecution.evaluate(CommandExecution.java:158) at org.springframework.shell.Shell.evaluate(Shell.java:208) at org.springframework.shell.Shell.run(Shell.java:140) at org.springframework.shell.jline.InteractiveShellRunner.run(InteractiveShellRunner.java:73) at org.springframework.shell.DefaultShellApplicationRunner.run(DefaultShellApplicationRunner.java:65) at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:762) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) at org.springframework.sbm.SpringShellApplication.main(SpringShellApplication.java:27) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) Caused by: java.lang.NullPointerException: Cannot invoke "org.openrewrite.java.tree.JavaType$FullyQualified.getFullyQualifiedName()" because "fullyQualified" is null at org.springframework.sbm.java.impl.OpenRewriteMethod.getReturnValue(OpenRewriteMethod.java:163) at org.springframework.sbm.boot.common.finder.SpringBeanMethodDeclarationFinder.lambda$apply$1(SpringBeanMethodDeclarationFinder.java:52) at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632) at org.springframework.sbm.boot.common.finder.SpringBeanMethodDeclarationFinder.lambda$apply$2(SpringBeanMethodDeclarationFinder.java:52) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at org.springframework.sbm.boot.common.finder.SpringBeanMethodDeclarationFinder.lambda$apply$6(SpringBeanMethodDeclarationFinder.java:54) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) at org.springframework.sbm.boot.common.finder.SpringBeanMethodDeclarationFinder.apply(SpringBeanMethodDeclarationFinder.java:45) at org.springframework.sbm.boot.common.finder.SpringBeanMethodDeclarationFinder.apply(SpringBeanMethodDeclarationFinder.java:30) at org.springframework.sbm.engine.context.ProjectContext.search(ProjectContext.java:77) at org.springframework.sbm.boot.upgrade_27_30.checks.CommonsMultipartResolverBeanFinder.findMatches(CommonsMultipartResolverBeanFinder.java:33) at org.springframework.sbm.boot.upgrade_27_30.checks.CommonsMultipartResolverSectionBuilder.isApplicable(CommonsMultipartResolverSectionBuilder.java:38) at org.springframework.sbm.boot.upgrade_27_30.SpringBoot30UpgradeReport.lambda$apply$0(SpringBoot30UpgradeReport.java:50) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at org.springframework.sbm.boot.upgrade_27_30.SpringBoot30UpgradeReport.apply(SpringBoot30UpgradeReport.java:52) at org.springframework.sbm.engine.recipe.AbstractAction.applyInternal(AbstractAction.java:58) at org.springframework.sbm.engine.recipe.Action.applyWithStatusEvent(Action.java:37) ... 28 more

Desktop (please complete the following information):

  • OS: Mac OS
  • Version Monterey

Additional context
Add any other context about the problem here.

@fabapp2
Copy link
Collaborator

fabapp2 commented Oct 12, 2022

Thanks for reporting @JoeWang1127
@sanagaraj-pivotal is looking into it.

@sanagaraj-pivotal
Copy link
Contributor

@JoeWang1127 PR on the way

@devendra2690
Copy link

Hello There, Is this issue fixed? Because I am still getting the same issue. I got the Spring boot upgrade jar from https://github.com/spring-projects-experimental/spring-boot-migrator#readme and when I am running the command mentioned there on the Readme page I get the same issue. Maven version --> Apache Maven 3.8.6 Java 17

@fabapp2
Copy link
Collaborator

fabapp2 commented Jun 12, 2023

Hi @devendra2690
Thanks for reporting.
The message comes from underlying code and without a full stacktrace it's impossible to tell if your error is the same.
Could you maybe provide the full stacktrace?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0 Spring Boot 3.0.0 type: bug Something isn't working upgrade:boot-report
Projects
None yet
4 participants