You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by ayman elwany <ay...@gmail.com> on 2010/01/12 15:19:44 UTC

unresolved constraint "org.osgi.service.event" problem

Hi all,

I'm new to OSGI and felix  , I working in OSGI example  from  *"Modular
Java" by Craig Walls .  *
*
*
After I wanted to add the logging bundle to my project so I did these 2
steps

pax-import-bundle -g org.ops4j.pax.logging -a pax-logging-api -v 1.3.0

pax-import-bundle -g org.ops4j.pax.logging -a pax-logging-service -v 1.3.0



but after I provision the application using pax-provision I had this
problem

    -> org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.logging.pax-logging-api [1]: package; (&(package=org.os
gi.service.event)(version>=1.0.0)(!(version>=2.0.0)))
ERROR: Error starting
file:bundles/org.ops4j.pax.logging.pax-logging-api_1.3.0.jar
(org.osgi.framework.BundleException: Unresolved constrain
t in bundle org.ops4j.pax.logging.pax-logging-api [1]: package;
(&(package=org.osgi.service.event)(version>=1.0.0)(!(version>=2.0.0))))
        at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)ERROR: Error
starting file:bundles/org.ops4j.pax.logging.pax-loggi
ng-service_1.3.0.jar (org.osgi.framework.BundleException: Unresolved
constraint in bundle org.ops4j.pax.logging.pax-logging-api [1]: package
; (&(package=org.osgi.service.event)(version>=1.0.0)(!(version>=2.0.0))))

        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.ops4j.pax.logging.pax-logging-api [1]: package; (&(package=org.osgi.
service.event)(version>=1.0.0)(!(version>=2.0.0)))
        at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3263)ERROR: Error
starting file:bundles/com.dudewheresmyjar.index_1.0.0
.SNAPSHOT.jar (org.osgi.framework.BundleException: Activator start error in
bundle com.dudewheresmyjar.index [5].)

        at org.apache.felix.framework.Felix.startBundle(Felix.java:1597)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at
org.compass.core.config.CompassConfiguration.<clinit>(CompassConfiguration.java:94)
        at
dwmj.index.internal.IndexServiceActivator.getCompass(IndexServiceActivator.java:23)
        at
dwmj.index.internal.IndexServiceActivator.start(IndexServiceActivator.java:13)
        at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:639)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1700)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1622)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1077)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory
        at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:738)
        at
org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
        at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1650)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 9 more


so how to deal with this error , thanks in advance

Re: unresolved constraint "org.osgi.service.event" problem

Posted by ayman elwany <ay...@gmail.com>.
I also tried your solution and it worked also , thanks again

On Tue, Jan 12, 2010 at 5:28 PM, ayman elwany <ay...@gmail.com> wrote:

> thanks Toni, I just solved the problem by doing this:
>
> I downloaded the install org.apache.felix.eventadmin-1.0.0.jar from
> http://mir2.ovh.net/ftp.apache.org/dist/felix/org.apache.felix.eventadmin-1.0.0.jar
>
> then from felix shell
>
> -> install file:C:\*Path*\org.apache.felix.eventadmin-1.0.0.jar
>
> then it worked ..
>
>
>
> On Tue, Jan 12, 2010 at 5:04 PM, Toni Menzel <to...@okidokiteam.com> wrote:
>
>> Hi,
>>
>> newer versions of pax runner (i suppose you run it using Pax Construct
>> looking at your scripts) do not install the compendium bundle anymore by
>> default.
>> You need to add that to your mix.
>> Looking at the provided example you can do this like so:
>> pax-import-bundle -g org.osgi -a org.osgi.compendium -v 4.2.0
>>
>> Toni
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: unresolved constraint "org.osgi.service.event" problem

Posted by ayman elwany <ay...@gmail.com>.
thanks Toni, I just solved the problem by doing this:

I downloaded the install org.apache.felix.eventadmin-1.0.0.jar from
http://mir2.ovh.net/ftp.apache.org/dist/felix/org.apache.felix.eventadmin-1.0.0.jar

then from felix shell

-> install file:C:\*Path*\org.apache.felix.eventadmin-1.0.0.jar

then it worked ..



On Tue, Jan 12, 2010 at 5:04 PM, Toni Menzel <to...@okidokiteam.com> wrote:

> Hi,
>
> newer versions of pax runner (i suppose you run it using Pax Construct
> looking at your scripts) do not install the compendium bundle anymore by
> default.
> You need to add that to your mix.
> Looking at the provided example you can do this like so:
> pax-import-bundle -g org.osgi -a org.osgi.compendium -v 4.2.0
>
> Toni
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: unresolved constraint "org.osgi.service.event" problem

Posted by Toni Menzel <to...@okidokiteam.com>.
Hi,

newer versions of pax runner (i suppose you run it using Pax Construct looking at your scripts) do not install the compendium bundle anymore by default.
You need to add that to your mix.
Looking at the provided example you can do this like so:
pax-import-bundle -g org.osgi -a org.osgi.compendium -v 4.2.0

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