karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Dywicki <l...@code-house.org>
Subject RE: Equinox packages
Date Tue, 23 Nov 2010 14:53:58 GMT
Hi again :)
Guillaume notified me about KARAF-239 resolved in 2.1 [1] release. I think
that it's workaround not the right solution. Installing Equinox extensions
in lib/ is kinda of hardcoding. There will be no way to enable aspects
through Karaf features.

[1] https://issues.apache.org/jira/browse/KARAF-239

-----Original Message-----
From: Łukasz Dywicki [mailto:luke@code-house.org] 
Sent: Tuesday, November 23, 2010 3:34 PM
To: dev@karaf.apache.org
Subject: RE: Equinox packages

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) :
} catch (IOException e) {
FrameworkLogEntry.ERROR, 0, "getResources error on " +
HookRegistry.HOOK_CONFIGURATORS_FILE, 0, e, null)); //$NON-NLS-1$

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,

-----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 
the following bundles are required :

# /org.eclipse.osgi/ (The system bundle)
# /org.eclipse.equinox.weaving.hook/ (Must be co-located with the system 
# /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.


On 21/11/10 21:59, Łukasz Dywicki wrote:
> Aspect Weaving Hooks Plug-in

View raw message