I am working in project where we are using FUSE and we are using apache velocity to load some necessary templates. Our project with includes all the methods and classes to work with velocity, also it has a velocity.properties from which we load our classloader. The file is this:

I believe you hit an usual problem when use Class.forName in OSGi container, that said, the bundle having code like Class.forName(velocity bundle in this case) doesn't import the class package that it try to initialize(and velocity bundle is impossible to import all potential package beforehand). This is also a usual case when try to load jdbc driver with Class.forname.

2. create a fragment bundle which contain the net.i2cat.mantychore.commandsets.junos.velocity.PersonalizeClassLoader and attach it to velocity bundle, so that any resource in fragment bundle is available for the host bundle.