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

Scan failed #1010

Open
jdavo opened this issue Nov 22, 2023 · 0 comments
Open

Scan failed #1010

jdavo opened this issue Nov 22, 2023 · 0 comments
Labels
type: bug Something isn't working

Comments

@jdavo
Copy link

jdavo commented Nov 22, 2023

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:

  1. 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
  2. scan ../path/to/project
  3. Scroll down to '....'
  4. 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

@jdavo jdavo added the type: bug Something isn't working label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant