[ https://issues.apache.org/jira/browse/CXF-6221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14341552#comment-14341552 ]
Krystian Panek commented on CXF-6221: ------------------------------------- I noticed 2 problems with using 3.1.0-snapshot version of cxf-integration-cdi: 1) {code} 2015-02-28 15:20:55,892 | WARN | pache.cxf.osgi]) | ServletExporter | 139 - org.apache.cxf.cxf-rt-transports-http - 3.1.0.SNAPSHOT | Error registering CXF OSGi servlet alias is already in use in this or another context org.osgi.service.http.NamespaceException: alias is already in use in this or another context at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:128)[58:org.ops4j.pax.web.pax-web-spi:3.1.4] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:206)[59:org.ops4j.pax.web.pax-web-runtime:3.1.4] {code} In my Karaf assembly,CXF non-spring servlet is registered at "/cxf" after installing feature 'cxf-jaxrs', so we have a collision. {code} <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <configuration> <bootFeatures> <! [...] --> <feature>cxf-jaxrs</feature> </bootFeatures> </configuration> </plugin> {code} 2) {code} 2015-02-28 15:20:57,350 | ERROR | FelixStartLevel | BootFeaturesInstaller | 25 - org.apache.karaf.features.core - 3.0.3 | Error installing boot features java.lang.Exception: Could not start bundle mvn:org.slf4j/slf4j-api/1.6.1 in feature(s) hydra-platform-support-1.0-SNAPSHOT: Unresolved constraint in bundle slf4j.api [144]: Unable to resolve 144.0: missing requirement [144.0] osgi.wiring.package; (&(osgi.wiring.package=org.slf4j.impl)(version>=1.6.0)) at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:504) at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:459) at org.apache.karaf.features.internal.BootFeaturesInstaller.installBootFeatures(BootFeaturesInstaller.java:92) {code} In Karaf we have already bundle with logger, so it shouldn't be installed again. .. did you investigated what is an effort to get working CDI scopes with CXF? > CDI integration extension does not detect annotations on Karaf > -------------------------------------------------------------- > > Key: CXF-6221 > URL: https://issues.apache.org/jira/browse/CXF-6221 > Project: CXF > Issue Type: Bug > Components: Integration, JAX-RS > Reporter: Krystian Panek > Assignee: Andriy Redko > Labels: cdi, extension, integration, karaf > Attachments: hydra.tar.gz, screenshot-1.png > > > I am trying to use portable extension to get working CDI 1.2 and CXF 3.0.2 on > Apache Karaf. I wrapped it into OSGi bundle. I installed to my container also: > * weld 2.1.1 > * pax-cdi-1.2 > * pax-cdi-1.2-web > * pax-cdi-web-weld > My JAXRS resources are not found by extension because some line from class > **JAXRSCdiResourceExtension** returns false even annotated element contains > proper annotation but as a proxy (see attachment image / screenshot from > debugger). > {code} > if (event.getAnnotated().isAnnotationPresent(ApplicationPath.class)) { > {code} > It would be nice, to tell me how to get it working. I also tested CDI-1.1. > Same situation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)