[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] xmlBlaster client as OSGi bundle (eclipse plugin)
Hey Michele,
I solved the problem by implementing a custom ClassLoaderFactory. If
passing properties to Global there is no problem at all because the
StandAloneClassLoaderFactory.getXmlBlasterClassLoader() is never called.
The problem is that in the mentioned function the class loader of the
this object is casted to URLClassLoader. Launching the
xmlBlaster-Client-OSGi-Bundle with the equinox framework, the class
loader is a EclipseClassLoader which isn't derived from URLClassLoader.
As a workaround I subclassed the StandAloneClassLoaderFactory, catch the
ClassCastException and return a new delegating URLClassLoader.
Regards, Kai
Michele Laghi schrieb:
> Hi Kai,
> there are some requirements about classloader when using xmlBlaster
> embedded:
>
> http://www.xmlblaster.org/xmlBlaster/doc/requirements/util.classloader.ClassLoaderFactory.html
> and
> http://www.xmlblaster.org/xmlBlaster/doc/requirements/util.classloader.XmlBlasterClassLoader.html
>
> particularly have you tried to set
>
> classloader.xmlBlaster=true in the property file ?
>
> I am not familiar with OSGI so could you tell me which implementation of
> the Class loader is used ?
>
> Regards
> Michele