[
https://issues.apache.org/jira/browse/KARAF-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16957952#comment-16957952
]
Timo E aus E commented on KARAF-6477:
-------------------------------------
another addition: Loading the bundle where blueprint consumes a service by
{code}
<reference id="singleInstanceResponderImpl"
interface="karafplayground.interface1.SingleInstanceResponder"
/>
{code}
works. I put it in a feature that seems to break stuff somehow.
> Using a SCR Component ref. for blueprint managed beans
> ------------------------------------------------------
>
> Key: KARAF-6477
> URL: https://issues.apache.org/jira/browse/KARAF-6477
> Project: Karaf
> Issue Type: Question
> Components: karaf
> Affects Versions: 4.2.6
> Reporter: Timo E aus E
> Priority: Major
>
> Hello,
> in a Blueprint managed bean, I want to inject a SCR managed
> component/service. Example codebase is here:
> https://github.com/timoe/karaf-4-playground/tree/blueprint-consumer.
> There is a {{BluePrintConsumer}} type which is bootstrapped by a Blueprint
> XML config. This injects a SCR component via
> {code}
> <reference id="singleInstanceResponderImpl"
> interface="karafplayground.interface1.SingleInstanceResponder"
> />
> {code}
> (see {{karafplayground.interface1.impl.SingleInstanceResponderImpl}} type).
> BluePrintConsumer is part of a feature {{feature-2}}. Once this feature is
> loaded it fails with
> {code}
> Unable to resolve root: missing requirement [root] osgi.identity;
> osgi.identity=playground-feature-2; type=karaf.feature;
> version="[0.0.1.SNAPSHOT,0.0.1.SNAPSHOT]";
> filter:="(&(osgi.identity=playground-feature-2)(type=karaf.feature)(version>=0.0.1.SNAPSHOT)(version<=0.0.1.SNAPSHOT))"
> [caused by: Unable to resolve playground-feature-2/0.0.1.SNAPSHOT: missing
> requirement [playground-feature-2/0.0.1.SNAPSHOT] osgi.identity;
> osgi.identity=karaf4-playground.playground-api-blueprint; type=osgi.bundle;
> version="[0.0.1.SNAPSHOT,0.0.1.SNAPSHOT]"; resolution:=mandatory [caused by:
> Unable to resolve karaf4-playground.playground-api-blueprint/0.0.1.SNAPSHOT:
> missing requirement
> [karaf4-playground.playground-api-blueprint/0.0.1.SNAPSHOT] osgi.service;
> effective:=active;
> filter:="(objectClass=karafplayground.interface1.SingleInstanceResponder)"]]
> {code}
> I'm using
> * maven-scr-plugin:1.26.2
> * maven-bundle-plugin:4.2.1
> Features {{aries-blueprint}} and {{deployr}} are installed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)