Sebastian,
Good news! it works ok when I put the code just in front of the run
method and add the necessary buddy policies. Learned some interesting
things about OSGi class loading on the way.
The strange thing however is that setting the caching classloader in the
Activator of the plugin doesn't work. Directl;y after setting it, it is
ok, but when later on the run method is called the classloader (asked
with ResourceLoaderFactory.getCurrentThreadResourceLoader() returns
null. It seems to get lost somewhere while the plugin is active.
Jos