You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Andy Lee <th...@gmail.com> on 2015/05/21 23:28:06 UTC

deciphering a constraint message

I've turned up felix logging to debug and I'm getting the following message
during startup:


DEBUG: Candidate permutation failed due to a conflict between imports; will
try another if possible. (org.osgi.service.resolver.ResolutionException:
Uses constraint violation. Unable to resolve resource core [core [19](R
19.0)] because it is exposed to package 'com.mine.foo' from resources foo [
foo [5](R 5.0)] and bar [bar [7](R 7.0)] via two dependency chains.

Chain 1:
  core [core [19](R 19.0)]
    import: (&(osgi.wiring.package=com.mine.foo
)(version>=1.5.0)(!(version>=2.0.0)))
     |
    export: osgi.wiring.package: com.mine.foo
  foo [foo [5](R 5.0)]

Chain 2:
  core [core [19](R 19.0)]
    import: (osgi.wiring.package=com.mine.init)
     |
    export: osgi.wiring.package: com.mine.init; uses:=com.mine.foo
    export: osgi.wiring.package=com.mine.foo
  bar [bar [7](R 7.0)])


Why is it complaining?  Only the 'foo' bundle exports com.mine.foo, so
there can't be conflicting exports.



--Andy

Re: deciphering a constraint message

Posted by Neil Bartlett <nj...@gmail.com>.
Double check that last assertion. The error message states that the package is exported by bar as well as foo.  

Neil 

-- 
Neil Bartlett
Sent from a phone


On Thursday, 21 May 2015 at 22:28, Andy Lee wrote:

> I've turned up felix logging to debug and I'm getting the following message
> during startup:
> 
> 
> DEBUG: Candidate permutation failed due to a conflict between imports; will
> try another if possible. (org.osgi.service.resolver.ResolutionException:
> Uses constraint violation. Unable to resolve resource core [core [19](R
> 19.0)] because it is exposed to package 'com.mine.foo' from resources foo [
> foo [5](R 5.0)] and bar [bar [7](R 7.0)] via two dependency chains.
> 
> Chain 1:
> core [core [19](R 19.0)]
> import: (&(osgi.wiring.package=com.mine.foo
> )(version>=1.5.0)(!(version>=2.0.0)))
> |
> export: osgi.wiring.package: com.mine.foo
> foo [foo [5](R 5.0)]
> 
> Chain 2:
> core [core [19](R 19.0)]
> import: (osgi.wiring.package=com.mine.init)
> |
> export: osgi.wiring.package: com.mine.init; uses:=com.mine.foo
> export: osgi.wiring.package=com.mine.foo
> bar [bar [7](R 7.0)])
> 
> 
> Why is it complaining? Only the 'foo' bundle exports com.mine.foo, so
> there can't be conflicting exports.
> 
> 
> 
> --Andy 


Re: deciphering a constraint message

Posted by Andy Lee <th...@gmail.com>.
Aha! I was re-exporting in bar.  Thanks for the help!

On Thu, May 21, 2015 at 5:57 PM, Klemens Edler <kl...@lunifera.com>
wrote:

> Maybe there is a visibility:=reexport in bar?
>
> On 21 May 2015 at 23:28, Andy Lee <th...@gmail.com> wrote:
>
> > I've turned up felix logging to debug and I'm getting the following
> message
> > during startup:
> >
> >
> > DEBUG: Candidate permutation failed due to a conflict between imports;
> will
> > try another if possible. (org.osgi.service.resolver.ResolutionException:
> > Uses constraint violation. Unable to resolve resource core [core [19](R
> > 19.0)] because it is exposed to package 'com.mine.foo' from resources
> foo [
> > foo [5](R 5.0)] and bar [bar [7](R 7.0)] via two dependency chains.
> >
> > Chain 1:
> >   core [core [19](R 19.0)]
> >     import: (&(osgi.wiring.package=com.mine.foo
> > )(version>=1.5.0)(!(version>=2.0.0)))
> >      |
> >     export: osgi.wiring.package: com.mine.foo
> >   foo [foo [5](R 5.0)]
> >
> > Chain 2:
> >   core [core [19](R 19.0)]
> >     import: (osgi.wiring.package=com.mine.init)
> >      |
> >     export: osgi.wiring.package: com.mine.init; uses:=com.mine.foo
> >     export: osgi.wiring.package=com.mine.foo
> >   bar [bar [7](R 7.0)])
> >
> >
> > Why is it complaining?  Only the 'foo' bundle exports com.mine.foo, so
> > there can't be conflicting exports.
> >
> >
> >
> > --Andy
> >
>
>
>
> --
> Klemens Edler
> COO, Lunifera GmbH
>
> Marchfelder Straße 2
> 2301 Groß-Enzersdorf
> Austria
>

Re: deciphering a constraint message

Posted by Klemens Edler <kl...@lunifera.com>.
Maybe there is a visibility:=reexport in bar?

On 21 May 2015 at 23:28, Andy Lee <th...@gmail.com> wrote:

> I've turned up felix logging to debug and I'm getting the following message
> during startup:
>
>
> DEBUG: Candidate permutation failed due to a conflict between imports; will
> try another if possible. (org.osgi.service.resolver.ResolutionException:
> Uses constraint violation. Unable to resolve resource core [core [19](R
> 19.0)] because it is exposed to package 'com.mine.foo' from resources foo [
> foo [5](R 5.0)] and bar [bar [7](R 7.0)] via two dependency chains.
>
> Chain 1:
>   core [core [19](R 19.0)]
>     import: (&(osgi.wiring.package=com.mine.foo
> )(version>=1.5.0)(!(version>=2.0.0)))
>      |
>     export: osgi.wiring.package: com.mine.foo
>   foo [foo [5](R 5.0)]
>
> Chain 2:
>   core [core [19](R 19.0)]
>     import: (osgi.wiring.package=com.mine.init)
>      |
>     export: osgi.wiring.package: com.mine.init; uses:=com.mine.foo
>     export: osgi.wiring.package=com.mine.foo
>   bar [bar [7](R 7.0)])
>
>
> Why is it complaining?  Only the 'foo' bundle exports com.mine.foo, so
> there can't be conflicting exports.
>
>
>
> --Andy
>



-- 
Klemens Edler
COO, Lunifera GmbH

Marchfelder Straße 2
2301 Groß-Enzersdorf
Austria