After migrating to 0.9.12, Getting exception : org.reflections.RflectionException: Scanner SubTypeScanner was not configured , even after configuring the scanner.
See original GitHub issueI was using 0.9.11 and with scanners it was working fine. but by just changing the version to 0.9.12 , stared getting the exception for “org.reflections.RflectionException: Scanner SubTypeScanner was not configured”.
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setUrls(ClasspathHelper.forPackage("my.project.prefix"))
.setScanners(new SubTypesScanner(), new TypeAnnotationsScanner()),
.filterInputsBy(new FilterBuilder().includePackage("my.project.prefix"))
);
reflections.getSubTypesOf(someClass); // here it throws exception
I noticed that, when I add a class which extend some class to the package, this error goes. Same with FieldAnnotationScanner , or any other scanner.
To try , please provide an invalid package for reflection creation, you will see all these errors coming even after configuring all scanners with reflection
Issue Analytics
- State:
- Created 4 years ago
- Reactions:48
- Comments:25 (2 by maintainers)
Top Results From Across the Web
Scanner TypeAnnotationsScanner was not configured, when ...
Using 0.9.12 of the reflections library I found registering the Scanner for each ElementType of the annotation was required.
Read more >Help with org.reflections api - Question - Scala Users
After migrating to 0.9.12, Getting exception : org.reflections.RflectionException: Scanner SubTypeScanner was not configured , even after ...
Read more >Scanner SubTypesScanner was not configured - Google Groups
I have the following invocation in my code: Classpath. ... org.reflections.ReflectionsException: Scanner SubTypesScanner was not configured.
Read more >A Guide to the Reflections Library - Baeldung
Learn how to configure the Reflections library and use it in your Java ... In the event that no scanner is configured, the...
Read more >Reflections (Reflections 0.9.10 API) - javadoc.io
Using Reflections you can query your metadata such as: get all subtypes of some type; get all types/constructors/methods/fields annotated with some annotation, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Guys please be aware that we are on an open source platform and this developer did some free work so you don’t have to do it yourself. I also wait for a fix, but we do not know the circumstances why the developer is currently not as responsive as in the past(maybe he currently does a world trip or has personal issues, how knows).
There are currently 569 forks of this project, maybe someone has already found a fix or you can fork it yourself and investigate it. Or you can try https://github.com/aschoerk/reflections8 as suggested above.
What’s the status here? This is a breaking issue that’s been open for 5-6 months now, and the pr to fix it got closed without an update?