[
https://issues.apache.org/jira/browse/KARAF-6477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16957841#comment-16957841
]
Timo E aus E commented on KARAF-6477:
-------------------------------------
I think I'm a little bit closer. It seems to be a blueprint problem. I added
another commit on
https://github.com/timoe/karaf-4-playground/tree/blueprint-consumer which tries
to expose {{SingleInstanceResponderImpl}} as a service (see
karaf4-playground/modules/api-impl-1/src/main/resources/OSGI-INF/blueprint.xml).
This service is not exposed. I think, blueprint is not correctly setup? But: If
I follow the instructions from
https://github.com/apache/karaf/tree/master/examples/karaf-blueprint-example
blueprint work.
>From what I can see in the Manifest. The example provider from
>https://github.com/apache/karaf/tree/master/examples/karaf-blueprint-example
>produces a manifest saying
{code}
Export-Service: org.apache.karaf.examples.blueprint.client.ClientService
;osgi.service.blueprint.compname=clientService
{code}
"My" Manifest doesn't.
> 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)