question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After migrating to 0.9.12, Getting exception : org.reflections.RflectionException: Scanner SubTypeScanner was not configured , even after configuring the scanner.

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:48
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
xreschcommented, Nov 15, 2020

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.

16reactions
tr7zwcommented, May 28, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found