I have a bunch of classes in different packages called "Datasources" which are all very similar. They extend an abstract base class, they have quite a few dependencies and implement some traits.  They also use @InheritConstructors annotation. 

I am unable to load any of them using newInstance() : 

import com.gsi.monitor.loader.CustomLoader
URLClassLoader loader = CustomLoader.getCustomLoader("master")
Datasource dsi = loader.loadClass("com.gsi.monitor.updater.global.Datasource").newInstance()
dsi.run()
println dsi.output

Error:    unable to resolve class Datasource 


What I find interesting, is that several other classes load as expected, and that the error is "unable to resolve".   The other classes I've tested are simpler classes, so I'm wondering what it is about the "Datasource" classes that us causing them to fail.  Could it be the annotations, or dependencies, etc? 

Note: These are running inside the script engine of Logicmonitor monitoring platform.   It has groovy-all-2.3.0 library. 

Any ideas?



Gerald R. Wiltse