Class.forName(className) does not work properly in Groovy. If you type Class.forName, the JVM does not use the correct class loader.
The solution is to use this instead:
Thread.currentThread().contextClassLoader.loadClass(className)
Advertisement
Tags: class loader