I am using the Google Reflections library for querying certain resources in the classpath. Those resources are located in the same location than the classes in my project.>
I just encountered the same problem with Reflections library (version 0.9.11), only when executing unit tests from Maven builds. The link provided in the accepted answer pointed me in the right direction.
A simple POM file change to my Surefire plugin fixed this:
org.apache.maven.plugins
maven-surefire-plugin
2.21.0
false
maven-failsafe-plugin
2.21.0
false
integration-test
verify
The config parameter defaults to 'true'. Forcing it to 'false' seems to resolve the classloader problem in my unit tests.