[ 
https://issues.apache.org/jira/browse/DIRSTUDIO-1068?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14718571#comment-14718571
 ] 

Robert Munteanu commented on DIRSTUDIO-1068:
--------------------------------------------

{quote}But to be honest I don't have a clue what makes the difference, do you 
have any idea?{quote}

I see that the slf4j-api bundle included in DirectoryStudio has an 
Import-Package statement ( strange for an API bundle )

{code}
 Export-Package = org.slf4j;version=1.7.10, org.slf4j.spi;version=1.7.10, 
org.slf4j.helpers;version=1.7.10
 Import-Package = org.slf4j.impl;version=1.6.0
{code}

That package is exported by the logback bundle, which in turns imports 
org.slf4j.helpers from the _other_ slf4j bundle, which is the root cause of the 
uses constraint violation. With this wiring the slf4j-api bundle would be 
exposed to the same package exported by two bundles.

I looked at the update site and noticed that the log binding features pulls in 
the org.apache.directory.studio.slf4j-eclipselog, which exports the 'impl' 
package and is actually a fragment bundle:

{code}
Fragment-Host: slf4j.api;bundle-version="[1.7.10,1.7.11)"
Export-Package: org.slf4j.impl;version="2.0.0"
{code}

This means that the slf4j-api bundle no longer has to be wired to the 
logback-core bundle to be resolved, which explains why this works.

{quote}Anyway, I hope that with DIRAPI-233 and update to LDAP API 1.0.0-M31 the 
additional slf4j-api 1.7.10 won't be required any more. I'll test when I find 
some time.{quote}

Is there a way I can test these changes myself?

> Bundles are not resolved on Eclipse Mars
> ----------------------------------------
>
>                 Key: DIRSTUDIO-1068
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-1068
>             Project: Directory Studio
>          Issue Type: Bug
>          Components: studio-updatesite
>            Reporter: Robert Munteanu
>         Attachments: eclipse-mars-error.log
>
>
> I have an Eclipse Mars install and installed Directory Studio using the 
> Eclipse Marketplace.
> After the installation is performed I have multiple error FrameworkEvents 
> logged regarding bundle installations. All of them bubble down to a uses 
> constraint violation.
> {noformat} Bundle was not resolved because of a uses contraint violation.
>   org.osgi.service.resolver.ResolutionException: Uses constraint violation. 
> Unable to resolve resource slf4j.api [osgi.identity; 
> osgi.identity="slf4j.api"; type="osgi.bundle"; version:Version="1.7.10"] 
> because it exports package 'org.slf4j.helpers' and is also exposed to it from 
> resource org.slf4j.api [osgi.identity; osgi.identity="org.slf4j.api"; 
> type="osgi.bundle"; version:Version="1.7.2.v20121108-1250"] via the following 
> dependency chain:
>   slf4j.api [osgi.identity; osgi.identity="slf4j.api"; type="osgi.bundle"; 
> version:Version="1.7.10"]
>     import: (&(osgi.wiring.package=org.slf4j.impl)(version>=1.6.0))
>      |
>     export: osgi.wiring.package=org.slf4j.impl; uses:=null
>   org.slf4j.api [osgi.identity; osgi.identity="org.slf4j.api"; 
> type="osgi.bundle"; version:Version="1.7.2.v20121108-1250"]
>     require: 
> (&(osgi.wiring.bundle=ch.qos.logback.classic)(&(bundle-version>=1.0.7)(!(bundle-version>=1.0.8))))
>      |
>     provide: osgi.wiring.bundle; 
> bundle-version:Version="1.0.7.v20121108-1250"; 
> osgi.wiring.bundle="ch.qos.logback.classic"
>   ch.qos.logback.classic [osgi.identity; 
> osgi.identity="ch.qos.logback.classic"; type="osgi.bundle"; 
> version:Version="1.0.7.v20121108-1250"]
>     import: (&(osgi.wiring.package=org.slf4j.helpers)(version>=1.7.0))
>      |{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to