felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: equinox/felix behaviour with lib/endorsed
Date Thu, 19 Apr 2012 13:07:47 GMT
Is your bundle importing the package in question? If not, you should 
import it in your bundle and then modify the system bundle to export the 
package.

If you don't want to import it (which is a bad idea), you could also add 
that package to the framework's boot delegation property.

The first option is the best.

-> richard

On 4/19/12 03:54 , Guillaume Yziquel wrote:
> Hi.
>
> I've encountered a problem concerning different behaviours between
> equinox and felix concerning jars in lib/endorsed (I'm using Karaf).
>
> I've got a bundle A that depends on classes located in a .jar in
> lib/endorsed. With equinox, the bundle A has no problems finding the
> classes. With felix, these classes are not found.
>
> Typical error messages I've found are:
>
> 09:50:39,041 | ERROR | rint Extender: 1 | BlueprintContainerImpl | ? ? | 10 - org.apache.aries.blueprint
- 0.3.1 | Unable to start blueprint container for bundle my.bundle.A
> org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate
components
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:644)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)[10:org.apache.aries.blueprint:0.3.1]
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_30]
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_30]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_30]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_30]
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)[:1.6.0_30]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_30]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_30]
> 	at java.lang.Thread.run(Thread.java:662)[:1.6.0_30]
> Caused by: java.lang.NoClassDefFoundError: my/missing/Class
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.6.0_30]
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)[:1.6.0_30]
> 	at java.lang.Class.getConstructors(Class.java:1459)[:1.6.0_30]
> 	at org.apache.aries.blueprint.container.BeanRecipe.findMatchingConstructors(BeanRecipe.java:439)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:263)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:706)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[10:org.apache.aries.blueprint:0.3.1]
> 	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:640)[10:org.apache.aries.blueprint:0.3.1]
> 	... 10 more
> Caused by: java.lang.ClassNotFoundException: my.missing.Class not found by my.bundle.A
[233]
> 	at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:845)
> 	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:74)
> 	at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1839)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_30]
> 	... 20 more
>
> I'd be interested in understanding more in details why behaviours
> between felix and equinox are different on this point. Pointers to
> documentation would be welcome.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message