You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Oliver Lietz (JIRA)" <ji...@apache.org> on 2019/01/02 11:57:00 UTC

[jira] [Commented] (SLING-8178) Unable to resolve org.apache.sling.resourceresolver due to missing EventHandler

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

Oliver Lietz commented on SLING-8178:
-------------------------------------

[~cziegeler], [~karlpauls]: Please have a look. The additional capability in the bnd file does not solve the problem (reliable) - see also discussion in issue [#2429|https://github.com/bndtools/bnd/issues/2429].

The least invasive solution for now is using an analyzer plugin which removes the require capability parameters generated by bnd:

{noformat}
-plugin:\
  org.apache.sling.bnd.plugins.header.RemoveParametersPlugin;\
    'Require-Capability'='osgi.service;filter:="(objectClass=org.osgi.service.event.EventAdmin)";effective:=active,osgi.service;filter:="(objectClass=org.osgi.service.event.EventHandler)";effective:=active;cardinality:=multiple'
{noformat}

Dropping DS from {{OsgiObservationBridge}} is not (no longer) an option for me.

WDYT?


> Unable to resolve org.apache.sling.resourceresolver due to missing EventHandler
> -------------------------------------------------------------------------------
>
>                 Key: SLING-8178
>                 URL: https://issues.apache.org/jira/browse/SLING-8178
>             Project: Sling
>          Issue Type: Bug
>          Components: Karaf, ResourceResolver
>            Reporter: Oliver Lietz
>            Assignee: Oliver Lietz
>            Priority: Major
>
> {noformat}
> 2018-12-15T17:08:37,254 | ERROR | activator-1-thread-2 | BootFeaturesInstaller            | 11 - org.apache.karaf.features.core - 4.2.1 | Error installing boot features
> org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=sling; type=karaf.feature; version="[0.1.1.SNAPSHOT,0.1.1.SNAPSHOT]"; filter:="(&(osgi.identity=sling)(type=karaf.feature)(version>=0.1.1.SNAPSHOT)(version<=0.1.1.SNAPSHOT))" [caused by: Unable to resolve sling/0.1.1.SNAPSHOT: missing requirement [sling/0.1.1.SNAPSHOT] osgi.identity; osgi.identity=org.apache.sling.resourceresolver; type=osgi.bundle; version="[1.6.8,1.6.8]"; resolution:=mandatory [caused by: Unable to resolve org.apache.sling.resourceresolver/1.6.8: missing requirement [org.apache.sling.resourceresolver/1.6.8] osgi.service; filter:="(objectClass=org.osgi.service.event.EventHandler)"; effective:=active; cardinality:=multiple]]
> 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
> 	at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392) ~[?:?]
> 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378) ~[?:?]
> 	at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332) ~[?:?]
> 	at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257) ~[?:?]
> 	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388) ~[?:?]
> 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1025) ~[?:?]
> 	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:964) ~[?:?]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
> 	at java.lang.Thread.run(Thread.java:748) [?:?]
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve sling/0.1.1.SNAPSHOT: missing requirement [sling/0.1.1.SNAPSHOT] osgi.identity; osgi.identity=org.apache.sling.resourceresolver; type=osgi.bundle; version="[1.6.8,1.6.8]"; resolution:=mandatory [caused by: Unable to resolve org.apache.sling.resourceresolver/1.6.8: missing requirement [org.apache.sling.resourceresolver/1.6.8] osgi.service; filter:="(objectClass=org.osgi.service.event.EventHandler)"; effective:=active; cardinality:=multiple]
> 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
> 	... 12 more
> Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve org.apache.sling.resourceresolver/1.6.8: missing requirement [org.apache.sling.resourceresolver/1.6.8] osgi.service; filter:="(objectClass=org.osgi.service.event.EventHandler)"; effective:=active; cardinality:=multiple
> 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
> 	at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343) ~[?:?]
> 	... 12 more
> {noformat}
> * [bnd #2429|https://github.com/bndtools/bnd/issues/2429]
> * SLING-7665



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)