[
https://issues.apache.org/jira/browse/KARAF-6919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240507#comment-17240507
]
Peter Rader commented on KARAF-6919:
------------------------------------
[~jbonofre] thank you. I really love the clean minimalistic example!
Unfortunately I was not able to construct an felix instance with a full-working
CDI example in-time. My request for extra time to the tech-review has been
refused. The presentation is in 3 Days, maybe I could catch that. Would you be
please agree with sending me the Karaf's minimal ziped deploy-folder for this
working CDI example ( [[email protected]|mailto:[email protected]] )? I do not care
if Aries or PAX.
> Karaf 4.3 can not load CDI Bundle having OSGi Services
> ------------------------------------------------------
>
> Key: KARAF-6919
> URL: https://issues.apache.org/jira/browse/KARAF-6919
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.3.0
> Environment: Windows x64
> JDK1.8
> Reporter: Peter Rader
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
> Labels: bundle, cdi, ioc, osgi
>
> Folowing
> [https://blog.osgi.org/2018/08/osgi-r7-highlights-cdi-integration.html] a
> annotation is used: org.osgi.service.cdi.annotations.Service
> Therefore I add this dependency to my maven project:
> {code:xml}
> <dependency>
> <groupId>org.osgi</groupId>
> <artifactId>org.osgi.service.cdi</artifactId>
> <version>1.0.0</version>
> <scope>provided</scope>
> </dependency>
> {code}
> And I create a class TestBean:
> {code:java}
> package de.e_nexus.vr.server.osgi;
> import org.osgi.service.cdi.annotations.Service;
> @Service
> public class TestBean {
> }
> {code}
> Unfortunately the result can not be load:
>
> {code:java}
> 11:24:10.552 WARN [fileinstall-C:\Program Files\apache-karaf-4.3.0/deploy]
> Error while starting bundle:
> file:/C:/Program%20Files/apache-karaf-4.3.0/deploy/vr.server-1.0.0.jar
> org.osgi.framework.BundleException: Unable to resolve VR-Server [87](R 87.0):
> missing requirement [VR-Server [87](R 87.0)] osgi.wiring.package;
> (&(osgi.wiring.package=org.osgi.service.cdi.annotations)(version>=1.0.0)(!(version>=2.0.0)))
> Unresolved requirements: [[VR-Server [87](R 87.0)] osgi.wiring.package;
> (&(osgi.wiring.package=org.osgi.service.cdi.annotations)(version>=1.0.0)(!(version>=2.0.0)))]
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)