Hi,
I installed these bundles to Karaf. I found issue with equinox fragments.
Framework resolves them correctly but Equinox use URLClassLoader from
org.apache.karaf.main.Main. This is main reason why fragments are not
"visible" for Equinox. I think that it's may be a bug or Equinox issue.
Guilty is following line second line
(org.eclipse.osgi.baseadaptor.HookRegistry.mergeFileHookConfigurators lines
from 107 to 115):
--
ClassLoader cl = getClass().getClassLoader();
// get all hook configurators files in your classloader delegation
Enumeration hookConfigurators;
try {
hookConfigurators = cl != null ?
cl.getResources(HookRegistry.HOOK_CONFIGURATORS_FILE) :
ClassLoader.getSystemResources(HookRegistry.HOOK_CONFIGURATORS_FILE);
} catch (IOException e) {
errors.add(new
FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME,
FrameworkLogEntry.ERROR, 0, "getResources error on " +
HookRegistry.HOOK_CONFIGURATORS_FILE, 0, e, null)); //$NON-NLS-1$
return;
}
--
The 'cl' variable points to URLClassLoader as long as it will not be a OSGi
managed class loaders Equinox hooks / fragments won't work correctly. I
don't have idea how fix that.
Best regards,
Lukasz
-----Original Message-----
From: Charles Moulliard [mailto:cmoulliard@gmail.com]
Sent: Monday, November 22, 2010 9:06 AM
To: dev@karaf.apache.org
Subject: Re: Equinox packages
Hi Lukasz,
According to Equinox documentation
(http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-quick-star
t.php),
the following bundles are required :
# /org.eclipse.osgi/ (The system bundle)
# /org.eclipse.equinox.weaving.hook/ (Must be co-located with the system
bundle!)
# /org.eclipse.equinox.weaving.aspectj/
# /org.aspectj.runtime/
# /org.aspectj.weaver/
The other are optional
I don't know what they would like to say but it seems that the system
fragment /org.eclipse.equinox.weaving.hook /must be placed after the
system bundle ! Try to change the bundle start level of this bundle to
have a lowest value as this is the case with the system bundle.
Regards,
Charles
On 21/11/10 21:59, Łukasz Dywicki wrote:
> Aspect Weaving Hooks Plug-in
|