The different is that the files in the etc/startup.properties are
processed first, while the features service is started later.
So if you use etc/startup.properties, the blueprint extender will be
wired to the cglib bundle, whereas if you put it in the features
descriptor, it will be installed after all bundles in
etc/startup.properties are installed and resolved.

Note that the bundle leve in that case has no effect, has the cglib
bundle does not even have to be started (and the framework will
resolve it automatically as needed once it has been installed).

On Fri, Feb 11, 2011 at 23:07, Bengt Rodehav <[email protected]> wrote:
> I'm using Karaf 2.1.3 together with Aries (0.2-incubating). I get the
> following exception:
>>
>> 2011-02-11 22:55:54,787 | ERROR | rint Extender: 3 | ServiceRecipe
>>            | lueprint.container.ServiceRecipe  284 | Error retrieving
>> service from ServiceRecipe[name='.component-2']
>> org.osgi.service.blueprint.container.ComponentDefinitionException:
>> Interceptors have been configured but neither asm nor cglib are available
>> at
>> org.apache.aries.blueprint.container.BeanRecipe.addInterceptors(BeanRecipe.java:694)
>> at
>> org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:748)
>> at
>> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
>> at
>> org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:60)
>> at
>> org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
>> at
>> org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
>> at
>> org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:198)
>> at
>> org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:137)
>> at
>> org.apache.aries.blueprint.container.ServiceRecipe.createRecipe(ServiceRecipe.java:352)[7:org.apache.aries.blueprint:0.2.0.incubating]
>> at
>> org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:260)[7:org.apache.aries.blueprint:0.2.0.incubating]
>> at
>> org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:230)[7:org.apache.aries.blueprint:0.2.0.incubating]
>> at
>> org.apache.aries.blueprint.container.ServiceRecipe.getService(ServiceRecipe.java:309)[7:org.apache.aries.blueprint:0.2.0.incubating]
>> at
>> org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:367)
>> at
>> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:307)
>> at
>> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:221)
>> at
>> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:295)[org.apache.felix.framework-3.0.2.jar:]
>> at
>> org.apache.felix.framework.Felix.getService(Felix.java:3007)[org.apache.felix.framework-3.0.2.jar:]
>> at
>> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:329)[org.apache.felix.framework-3.0.2.jar:]
>> at org.apache.felix.ipojo.IPojoContext.getService(IPojoContext.java:260)
>> at org.apache.felix.ipojo.util.Tracker.getService(Tracker.java:441)
>> at
>> org.apache.felix.ipojo.util.DependencyModel.getService(DependencyModel.java:911)[46:org.apache.felix.ipojo:1.6.8]
>> at
>> org.apache.felix.ipojo.handlers.dependency.Dependency.createServiceObject(Dependency.java:638)
>> at
>> org.apache.felix.ipojo.handlers.dependency.Dependency.onGet(Dependency.java:609)
>> at
>> org.apache.felix.ipojo.InstanceManager.onGet(InstanceManager.java:960)[46:org.apache.felix.ipojo:1.6.8]
>> ...
>
> Apparently cglib is resolved too late. When I get the above exception I use
> the following in my features repo:
>>
>>   <feature name="connect-aries" version="1.1.0-SNAPSHOT">
>>     <bundle
>> start-level="40">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.cglib/2.1_3_4</bundle>
>>     ...
>
> The "connect-aries" features is listed in my org.apache.karaf.features.cfg.
> However, if I instead add the following line to the end of my
> startup.properties file then it works perfectly:
>>
>>
>> org/apache/servicemix/bundles/org.apache.servicemix.bundles.cglib/2.1_3_4/org.apache.servicemix.bundles.cglib-2.1_3_4.jar=40
>
> Why is there a diffence? I'm trying to get rid of the line in
> startup.properties in order to mess as little as possible with the Karaf
> standard installation.
> /Bengt
>
>
>
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to