You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Timo E aus E (Jira)" <ji...@apache.org> on 2019/10/23 08:19:00 UTC
[jira] [Created] (KARAF-6477) Using a SCR Component ref. for
blueprint managed beans
Timo E aus E created KARAF-6477:
-----------------------------------
Summary: 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
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)