You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Stijn de Witt <st...@planon.nl> on 2010/07/19 13:28:22 UTC

NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Hi,

I am trying to use the DependencyManager in my projects. For this I have created a base activator in my framework code that extends DependencyActivatorBase and in my bundles the activator extends base activator. I added the DependencyManager jar to the startup bundles for Felix and if I use the shell console I can see that it is running. Still, when I try to start my bundle, I get an error saying NoClassDefFoundError: DependencyActivatorBase.

I looked into the MANIFEST.MF in the DepencyManager jar and it exports org.apache.felix.dm. I checked the MANIFEST.MF in my bundle jar and it imports org.apache.felix.dm. Everything looks fine to me, but I am obviously doing something wrong... any ideas?

HTH,

-Stijn


Felix Remote Shell Console:
============================

-> ps
START LEVEL 2
   ID   State         Level  Name
[   0] [Active     ] [    0] System Bundle (2.0.5)
[   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
[   2] [Active     ] [    1] Apache Felix Remote Shell (1.0.4)
[   3] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
[   4] [Active     ] [    1] Apache Felix Dependency Manager (3.0.0.SNAPSHOT)
[   5] [Active     ] [    2] Apache Felix File Install (3.0.0)
[   6] [Resolved   ] [    1] Planon StijnsModule Server Bundle (201007.0.0.0D)
-> start 6
java.lang.NoClassDefFoundError: org/apache/felix/dm/DependencyActivatorBase
->



RE: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Posted by Stijn de Witt <st...@planon.nl>.
Yes this turned out to be the problem. The base activator was using DependencyActivatorBase loaded from the framework, which technically is a different class then DependencyActivatorBase loaded from the DependencyManager bundle. Turns out I don't even need to deploy DependencyManager as a bundle at all.

HTH,

-Stijn


-----Original Message-----
From: Stijn de Witt [mailto:stijn.dewitt@planon.nl] 
Sent: Monday, July 19, 2010 1:52 PM
To: users@felix.apache.org
Subject: RE: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

I am exporting the base activator class through the bootstrap configuration option "org.osgi.framework.system.packages.extra". So probably, I also have to make org.apache.felix.dm available through there. I will try that out now and let you know if that helped.

HTH,

-Stijn


-----Original Message-----
From: Marcel Offermans [mailto:marcel.offermans@luminis.nl] 
Sent: Monday, July 19, 2010 1:34 PM
To: users@felix.apache.org
Subject: Re: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Hello Stijn,

The only think I can think of is that although bundle 6 is resolved, it did not import the org.apache.felix.dm package from bundle 4. Could it be someone else is also exporting it?

Greetings, Marcel

-----

On Jul 19, 2010, at 13:28 , Stijn de Witt wrote:

> I am trying to use the DependencyManager in my projects. For this I have created a base activator in my framework code that extends DependencyActivatorBase and in my bundles the activator extends base activator. I added the DependencyManager jar to the startup bundles for Felix and if I use the shell console I can see that it is running. Still, when I try to start my bundle, I get an error saying NoClassDefFoundError: DependencyActivatorBase.
> 
> I looked into the MANIFEST.MF in the DepencyManager jar and it exports org.apache.felix.dm. I checked the MANIFEST.MF in my bundle jar and it imports org.apache.felix.dm. Everything looks fine to me, but I am obviously doing something wrong... any ideas?
> 
> HTH,
> 
> -Stijn
> 
> 
> Felix Remote Shell Console:
> ============================
> 
> -> ps
> START LEVEL 2
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.5)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Remote Shell (1.0.4)
> [   3] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> [   4] [Active     ] [    1] Apache Felix Dependency Manager (3.0.0.SNAPSHOT)
> [   5] [Active     ] [    2] Apache Felix File Install (3.0.0)
> [   6] [Resolved   ] [    1] Planon StijnsModule Server Bundle (201007.0.0.0D)
> -> start 6
> java.lang.NoClassDefFoundError: org/apache/felix/dm/DependencyActivatorBase
> ->


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


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


RE: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Posted by Stijn de Witt <st...@planon.nl>.
I am exporting the base activator class through the bootstrap configuration option "org.osgi.framework.system.packages.extra". So probably, I also have to make org.apache.felix.dm available through there. I will try that out now and let you know if that helped.

HTH,

-Stijn


-----Original Message-----
From: Marcel Offermans [mailto:marcel.offermans@luminis.nl] 
Sent: Monday, July 19, 2010 1:34 PM
To: users@felix.apache.org
Subject: Re: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Hello Stijn,

The only think I can think of is that although bundle 6 is resolved, it did not import the org.apache.felix.dm package from bundle 4. Could it be someone else is also exporting it?

Greetings, Marcel

-----

On Jul 19, 2010, at 13:28 , Stijn de Witt wrote:

> I am trying to use the DependencyManager in my projects. For this I have created a base activator in my framework code that extends DependencyActivatorBase and in my bundles the activator extends base activator. I added the DependencyManager jar to the startup bundles for Felix and if I use the shell console I can see that it is running. Still, when I try to start my bundle, I get an error saying NoClassDefFoundError: DependencyActivatorBase.
> 
> I looked into the MANIFEST.MF in the DepencyManager jar and it exports org.apache.felix.dm. I checked the MANIFEST.MF in my bundle jar and it imports org.apache.felix.dm. Everything looks fine to me, but I am obviously doing something wrong... any ideas?
> 
> HTH,
> 
> -Stijn
> 
> 
> Felix Remote Shell Console:
> ============================
> 
> -> ps
> START LEVEL 2
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.5)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Remote Shell (1.0.4)
> [   3] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> [   4] [Active     ] [    1] Apache Felix Dependency Manager (3.0.0.SNAPSHOT)
> [   5] [Active     ] [    2] Apache Felix File Install (3.0.0)
> [   6] [Resolved   ] [    1] Planon StijnsModule Server Bundle (201007.0.0.0D)
> -> start 6
> java.lang.NoClassDefFoundError: org/apache/felix/dm/DependencyActivatorBase
> ->


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


Re: NoClassDefFoundError: DependencyActivatorBase, but DependencyManager bundle is ACTIVE

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Stijn,

On Jul 19, 2010, at 13:28 , Stijn de Witt wrote:

> I am trying to use the DependencyManager in my projects. For this I have created a base activator in my framework code that extends DependencyActivatorBase and in my bundles the activator extends base activator. I added the DependencyManager jar to the startup bundles for Felix and if I use the shell console I can see that it is running. Still, when I try to start my bundle, I get an error saying NoClassDefFoundError: DependencyActivatorBase.
> 
> I looked into the MANIFEST.MF in the DepencyManager jar and it exports org.apache.felix.dm. I checked the MANIFEST.MF in my bundle jar and it imports org.apache.felix.dm. Everything looks fine to me, but I am obviously doing something wrong... any ideas?
> 
> HTH,
> 
> -Stijn
> 
> 
> Felix Remote Shell Console:
> ============================
> 
> -> ps
> START LEVEL 2
>   ID   State         Level  Name
> [   0] [Active     ] [    0] System Bundle (2.0.5)
> [   1] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
> [   2] [Active     ] [    1] Apache Felix Remote Shell (1.0.4)
> [   3] [Active     ] [    1] OSGi R4 Compendium Bundle (4.1.0)
> [   4] [Active     ] [    1] Apache Felix Dependency Manager (3.0.0.SNAPSHOT)
> [   5] [Active     ] [    2] Apache Felix File Install (3.0.0)
> [   6] [Resolved   ] [    1] Planon StijnsModule Server Bundle (201007.0.0.0D)
> -> start 6
> java.lang.NoClassDefFoundError: org/apache/felix/dm/DependencyActivatorBase
> ->

The only think I can think of is that although bundle 6 is resolved, it did not import the org.apache.felix.dm package from bundle 4. Could it be someone else is also exporting it?

Greetings, Marcel


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