Closed GoogleCodeExporter closed 9 years ago
Same issue for me. I tried the following:
reflections.getSubTypesOf(baseClass);
reflections.getTypesAnnotatedWith(annotation);
reflections.getStore().getSubTypesOf(baseClass.getName());
This logic is in one of my core libraries, when I use it with a normal Java
application it gives the expected result, however in a webapplication (with the
same libraries included) it cannot find anything.
Result of Reflection logline in webapplication:
INFO org.reflections.Reflections - Reflections took 179 ms to scan 9 urls,
producing 2 keys and 2 values
My normal Java application produces:
19:01:14.270 [main] INFO org.reflections.Reflections - Reflections took 110 ms
to scan 6 urls, producing 8 keys and 9 values
These are both testprojects containing the same libraries.
Original comment by RoelBeck...@gmail.com
on 18 Dec 2010 at 6:01
This may be caused by having spaces in the directory getting to the class
directory.
Ex1. "C:\Program Files\Apache Software Foundation\Tomcat
6.0\webapps\application\WEB-INF\classes\..." would not work find a class in
here because the path has spaces in the name.
Ex2. "C:\tomcat\webapps\application\WEB-INF\classes\..." would find the class.
More detail in: http://code.google.com/p/reflections/issues/detail?id=65
Original comment by curtis.p...@gmail.com
on 5 Jan 2011 at 4:41
For me it's not the reason definitely. I tried this on Linux and have this
problem too.
Original comment by tpreal
on 6 Jan 2011 at 12:56
This solution works fine for me.
Original comment by alexferr...@gmail.com
on 9 Feb 2011 at 8:38
fixed on trunk
Original comment by ronm...@gmail.com
on 12 May 2011 at 7:49
Original issue reported on code.google.com by
tpreal
on 14 Dec 2010 at 1:49