You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Ivanhoe Abrahams <iv...@gmail.com> on 2009/10/10 17:12:29 UTC

Help with unresolved constraint on org.osgi.framework version 1.5

Hi Everybody

After about 2 months of not playing with OSGI, I finally have some time
again.
In the mean time I see Felix has moved on to version 2

I use pax provision to run felix. But now I encounter a problem starting up
the system.
It seem as if felix shell now has a dependency on a different  version of
the core osgi bundle. But I cant find the correct maven repository to get
this version from.

Can someone please tell me what my maven dependency should look like to
satisfy the below "Unresolved constraint" that I encounter ...below is the
Error message....Thank you in advance



Welcome to Felix
================

org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.felix.shell [124]: package;
(&(package=org.osgi.framework)(version>=1.5.0))
        at
org.apache.felix.framework.Felix.resolveBundle(Felix.java:3268)ERROR: Error
starting file:bundles/org.apache.felix.shell_1.4.0.jar
(org.osgi.framework.BundleException: Unresolved constraint
 in bundle org.apache.felix.shell [124]: package;
(&(package=org.osgi.framework)(version>=1.5.0)))

        at org.apache.felix.framework.Felix.startBundle(Felix.java:1596)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
ERROR: Error starting file:bundles/org.apache.felix.shell.tui_1.4.0.jar
(org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.felix.shell [124]: package; (&(package=org.osgi.
framework)(version>=1.5.0)))
org.osgi.framework.BundleException: Unresolved constraint in bundle
org.apache.felix.shell [124]: package;
(&(package=org.osgi.framework)(version>=1.5.0))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3268)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1596)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)



Thanks

Ivanhoe

Re: Help with unresolved constraint on org.osgi.framework version 1.5

Posted by "Richard S. Hall" <he...@ungoverned.org>.
The shell dependency was actually a mistake. We will release a new 
version of it that has a lower dependency, since it doesn't really 
require 1.5.

However, I think the latest OSGi JARs are in the central Maven repo:

     org.osgi
     org.osgi.core
     4.2.0

-> richard

On 10/10/09 17:12, Ivanhoe Abrahams wrote:
> Hi Everybody
>
> After about 2 months of not playing with OSGI, I finally have some time
> again.
> In the mean time I see Felix has moved on to version 2
>
> I use pax provision to run felix. But now I encounter a problem starting up
> the system.
> It seem as if felix shell now has a dependency on a different  version of
> the core osgi bundle. But I cant find the correct maven repository to get
> this version from.
>
> Can someone please tell me what my maven dependency should look like to
> satisfy the below "Unresolved constraint" that I encounter ...below is the
> Error message....Thank you in advance
>
>
>
> Welcome to Felix
> ================
>
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.felix.shell [124]: package;
> (&(package=org.osgi.framework)(version>=1.5.0))
>          at
> org.apache.felix.framework.Felix.resolveBundle(Felix.java:3268)ERROR: Error
> starting file:bundles/org.apache.felix.shell_1.4.0.jar
> (org.osgi.framework.BundleException: Unresolved constraint
>   in bundle org.apache.felix.shell [124]: package;
> (&(package=org.osgi.framework)(version>=1.5.0)))
>
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:1596)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
>          at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>          at java.lang.Thread.run(Thread.java:619)
> ERROR: Error starting file:bundles/org.apache.felix.shell.tui_1.4.0.jar
> (org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.felix.shell [124]: package; (&(package=org.osgi.
> framework)(version>=1.5.0)))
> org.osgi.framework.BundleException: Unresolved constraint in bundle
> org.apache.felix.shell [124]: package;
> (&(package=org.osgi.framework)(version>=1.5.0))
>          at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3268)
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:1596)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
>          at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>          at java.lang.Thread.run(Thread.java:619)
>
>
>
> Thanks
>
> Ivanhoe
>
>    

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


Re: Help with unresolved constraint on org.osgi.framework version 1.5

Posted by Guo Du <mr...@gmail.com>.
On Sun, Oct 11, 2009 at 10:54 AM, Ivanhoe Abrahams
<iv...@gmail.com> wrote:
> org.osgi.framework.BundleException: Bundle symbolic name and version are not
> unique: org.apache.felix.framework:2.0.0

I am not familiar with pax, it looks like you have felix 1.x.x and
2.0.0 loaded at the same time. You may configure pax to using 2.0.0 as
OSGi runtime instead of 1.x.x.


> I see that Richard has also responded to say that this dependency on 1.5 is
> actually a mistake and will be rectified. I will wait for that fix. By the
If you don't have production system deployment on felix 1.x.x. It's
better to just using felix 2.x.x. It implemented osgi spec 4.2 and
where community is active focus on.

> java.lang.ClassCastException: org.apache.felix.shell.impl.Activator cannot
> be cast to org.osgi.framework.BundleActivatorERROR: Error starting
> file:bundles/org.apache.felix.shell_1.4.0.jar (org.osgi.fr
> amework.BundleException: Activator start error in bundle
> org.apache.felix.shell [125].)
>
It's expected behaviour with different version loaded at different
bundle. org.osgi.framework* are exported as part of the system bundle,
you don't need manual load somewhere else unless you know what you are
doning.

--Guo

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


Re: Help with unresolved constraint on org.osgi.framework version 1.5

Posted by "Richard S. Hall" <he...@ungoverned.org>.
You shouldn't be trying to load the framework JAR file as a bundle, nor 
is there much reason to load the OSGi core JAR as a bundle.

It is not really clear what you are trying to do. I assume you can start 
Felix 2.0.0 with the PAX tools...perhaps you should ask over on their 
mailing lists if no one reading this can answer...

-> richard

On 10/11/09 11:54, Ivanhoe Abrahams wrote:
> H Guo
> Thank you for your response
>
> I have tried your suggestion, but I am now getting different error
>
> Welcome to Felix
> ================
>
> org.osgi.framework.BundleException: Bundle symbolic name and version are not
> unique: org.apache.felix.framework:2.0.0
>          at
> org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1125)
>          at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:82)
>          at org.apache.felix.framework.Felix.installBundle(Felix.java:2379)
>          at org.apache.felix.framework.Felix.installBundle(Felix.java:2282)
>          at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
>          at
> org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:272)
>          at
> org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:75)
>
>
> I see that Richard has also responded to say that this dependency on 1.5 is
> actually a mistake and will be rectified. I will wait for that fix. By the
> way, in his post he hints that I can use the osgi core jar from the central
> Maven repo., but that causes a whol lot of classcastexceptions. see below
>
> Welcome to Felix
> ================
>
> java.lang.ClassCastException: org.apache.felix.shell.impl.Activator cannot
> be cast to org.osgi.framework.BundleActivatorERROR: Error starting
> file:bundles/org.apache.felix.shell_1.4.0.jar (org.osgi.fr
> amework.BundleException: Activator start error in bundle
> org.apache.felix.shell [125].)
>
>          at
> org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3525)
>          at org.apache.felix.framework.Felix.activateBundle(Felix.java:1694)
>          at org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
>          at
> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
>          at
> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>
> I guess waiting for the fix mentioned by Richard is best.
>
> Once again thanks
>
> Ivanhoe
>
>
>
> On Sat, Oct 10, 2009 at 7:16 PM, Guo Du<mr...@gmail.com>  wrote:
>
>    
>> On Sat, Oct 10, 2009 at 4:12 PM, Ivanhoe Abrahams
>> <iv...@gmail.com>  wrote:
>>      
>>> Hi Everybody
>>>
>>> After about 2 months of not playing with OSGI, I finally have some time
>>> again.
>>> In the mean time I see Felix has moved on to version 2
>>>
>>> I use pax provision to run felix. But now I encounter a problem starting
>>>        
>> up
>>      
>>> the system.
>>> It seem as if felix shell now has a dependency on a different  version of
>>> the core osgi bundle. But I cant find the correct maven repository to get
>>> this version from.
>>>
>>> Can someone please tell me what my maven dependency should look like to
>>> satisfy the below "Unresolved constraint" that I encounter ...below is
>>>        
>> the
>>      
>>> Error message....Thank you in advance
>>>
>>>        
>> You may try
>>     <dependency>
>>
>>       <groupId>org.apache.felix</groupId>
>>
>>       <artifactId>org.apache.felix.framework</artifactId>
>>
>>       <version>2.0.0</version>
>>
>>     </dependency>
>>
>> Felix 1.X.X has org.osgi.framework<=1.2.
>>
>> Good luck!
>>
>> -Guo
>>
>> ---------------------------------------------------------------------
>> 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: Help with unresolved constraint on org.osgi.framework version 1.5

Posted by Ivanhoe Abrahams <iv...@gmail.com>.
H Guo
Thank you for your response

I have tried your suggestion, but I am now getting different error

Welcome to Felix
================

org.osgi.framework.BundleException: Bundle symbolic name and version are not
unique: org.apache.felix.framework:2.0.0
        at
org.apache.felix.framework.BundleImpl.createModule(BundleImpl.java:1125)
        at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:82)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2379)
        at org.apache.felix.framework.Felix.installBundle(Felix.java:2282)
        at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:130)
        at
org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:272)
        at
org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:75)


I see that Richard has also responded to say that this dependency on 1.5 is
actually a mistake and will be rectified. I will wait for that fix. By the
way, in his post he hints that I can use the osgi core jar from the central
Maven repo., but that causes a whol lot of classcastexceptions. see below

Welcome to Felix
================

java.lang.ClassCastException: org.apache.felix.shell.impl.Activator cannot
be cast to org.osgi.framework.BundleActivatorERROR: Error starting
file:bundles/org.apache.felix.shell_1.4.0.jar (org.osgi.fr
amework.BundleException: Activator start error in bundle
org.apache.felix.shell [125].)

        at
org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3525)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:1694)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1621)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)

I guess waiting for the fix mentioned by Richard is best.

Once again thanks

Ivanhoe



On Sat, Oct 10, 2009 at 7:16 PM, Guo Du <mr...@gmail.com> wrote:

> On Sat, Oct 10, 2009 at 4:12 PM, Ivanhoe Abrahams
> <iv...@gmail.com> wrote:
> > Hi Everybody
> >
> > After about 2 months of not playing with OSGI, I finally have some time
> > again.
> > In the mean time I see Felix has moved on to version 2
> >
> > I use pax provision to run felix. But now I encounter a problem starting
> up
> > the system.
> > It seem as if felix shell now has a dependency on a different  version of
> > the core osgi bundle. But I cant find the correct maven repository to get
> > this version from.
> >
> > Can someone please tell me what my maven dependency should look like to
> > satisfy the below "Unresolved constraint" that I encounter ...below is
> the
> > Error message....Thank you in advance
> >
>
> You may try
>    <dependency>
>
>      <groupId>org.apache.felix</groupId>
>
>      <artifactId>org.apache.felix.framework</artifactId>
>
>      <version>2.0.0</version>
>
>    </dependency>
>
> Felix 1.X.X has org.osgi.framework <=1.2.
>
> Good luck!
>
> -Guo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Help with unresolved constraint on org.osgi.framework version 1.5

Posted by Guo Du <mr...@gmail.com>.
On Sat, Oct 10, 2009 at 4:12 PM, Ivanhoe Abrahams
<iv...@gmail.com> wrote:
> Hi Everybody
>
> After about 2 months of not playing with OSGI, I finally have some time
> again.
> In the mean time I see Felix has moved on to version 2
>
> I use pax provision to run felix. But now I encounter a problem starting up
> the system.
> It seem as if felix shell now has a dependency on a different  version of
> the core osgi bundle. But I cant find the correct maven repository to get
> this version from.
>
> Can someone please tell me what my maven dependency should look like to
> satisfy the below "Unresolved constraint" that I encounter ...below is the
> Error message....Thank you in advance
>

You may try
    <dependency>

      <groupId>org.apache.felix</groupId>

      <artifactId>org.apache.felix.framework</artifactId>

      <version>2.0.0</version>

    </dependency>

Felix 1.X.X has org.osgi.framework <=1.2.

Good luck!

-Guo

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