-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Describe the bug
Found more than one resource of type 'class java.lang.Class'. Use class org.springframework.sbm.project.resource.filter.GenericTypeListFilter instead.
Details of the error have been omitted. You can use the stacktrace command to print the full stacktrace.
SBM Version
0.15.0
SBM Application
shell
To Reproduce
Steps to reproduce the behavior:
- ran jar using
java -jar --add-opens java.base/sun.nio.ch=ALL-UNNAMED -Dsbm.gitSupportEnabled=false --add-opens java.base/java.io=ALL-UNNAMED spring-boot-migrator.jar
- scan ../path/to/project
- Scroll down to '....'
- See error
Expected behavior
Expected to continue
Stacktrace
org.springframework.sbm.project.resource.filter.ResourceFilterException: Found more than one resource of type 'class java.lang.Class'. Use class org.springframework.sbm.project.resource.filter.GenericTypeListFilter instead.
at org.springframework.sbm.project.resource.GenericTypeFilter.apply(GenericTypeFilter.java:43)
at org.springframework.sbm.project.resource.GenericTypeFilter.apply(GenericTypeFilter.java:27)
at org.springframework.sbm.engine.context.ProjectContext.search(ProjectContext.java:101)
at org.springframework.sbm.jee.jpa.actions.MigratePersistenceXmlToApplicationPropertiesAction.isApplicable(MigratePersistenceXmlToApplicationPropertiesAction.java:78)
at org.springframework.sbm.engine.recipe.Recipe.lambda$isApplicable$0(Recipe.java:92)
at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
...
at org.springframework.sbm.engine.recipe.Recipe.isApplicable(Recipe.java:92)
at org.springframework.sbm.engine.recipe.Recipes.lambda$getApplicable$2(Recipes.java:50)
...
at org.springframework.sbm.engine.recipe.Recipes.getApplicable(Recipes.java:51)
at org.springframework.sbm.engine.commands.ApplicableRecipeListCommand.getApplicableRecipes(ApplicableRecipeListCommand.java:48)
at org.springframework.sbm.engine.commands.ApplicableRecipeListCommand.execute(ApplicableRecipeListCommand.java:42)
at org.springframework.sbm.shell.ScanShellCommand.scan(ScanShellCommand.java:69)
Desktop (please complete the following information):
- OS:Ubuntu
- Version 22.04
Additional context
JDK 18
'Heavy' use of generics in java code? (similar code behaves OK in another Spring Boot application)
spring-boot-upgrade.jar passed OK without errors but mentioned #674