Play 2.4-RC5: ReflectionsException: Scanner SubTypesScanner was not configured

1,442 views
Skip to first unread message

Guofeng Zhang

unread,
May 28, 2015, 3:33:25 AM5/28/15
to play-fr...@googlegroups.com
Hi,

I have the following invocation in my code:
   Classpath.getTypesAnnotatedWith(application, "models", Entity.class)
when it is executed, it throws:
org.reflections.ReflectionsException: Scanner SubTypesScanner was not configured
     org.reflections.Store.get(Store.java:58)
     org.reflections.Store.get(Store.java:70)
     org.reflections.Store.getAll(Store.java:97)
     org.reflections.Reflections.getAllAnnotated(Reflections.java:423)
     org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:384)
     org.reflections.Reflections.getTypesAnnotatedWith(Reflections.java:370)
     play.libs.Classpath.getTypesAnnotatedWith(Classpath.java:44)
     ......

I change Classpath.getReflections() the following from
 .setScanners(new TypeElementsScanner(), new TypeAnnotationsScanner())) ;
to
 .setScanners(new TypeElementsScanner(), new TypeAnnotationsScanner(), new SubTypesScanner())) ;
The above invocation worked.

Is it a bug in Classpath.getReflections() or the way I invoked getTypesAnnotatedWith improperly?

Thanks for your help.

Guofeng

Guofeng Zhang

unread,
May 28, 2015, 3:55:05 AM5/28/15
to play-fr...@googlegroups.com
the same exception using just released 2.4.0

CheeseSpy

unread,
Jul 14, 2015, 8:55:19 PM7/14/15
to play-fr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages