Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 86AA82009D9 for ; Thu, 19 May 2016 12:41:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 853F6160A1D; Thu, 19 May 2016 10:41:14 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D01DA160A00 for ; Thu, 19 May 2016 12:41:13 +0200 (CEST) Received: (qmail 13119 invoked by uid 500); 19 May 2016 10:41:13 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 13102 invoked by uid 99); 19 May 2016 10:41:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2016 10:41:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E1FB52C1F58 for ; Thu, 19 May 2016 10:41:12 +0000 (UTC) Date: Thu, 19 May 2016 10:41:12 +0000 (UTC) From: "Christian Lutz (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6904) Unable to read swagger annotations if the file is in another osgi bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 19 May 2016 10:41:14 -0000 [ https://issues.apache.org/jira/browse/CXF-6904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15290877#comment-15290877 ] Christian Lutz commented on CXF-6904: ------------------------------------- Hello [~ay], your workaround works only for felix, if you switch to equinox you got the same behavior as before. Maybe this helps in finding the root cause of this problem. But anyway thank you very much. Note: If you switch to equinox please remember: It may happen that one component is complaining about a missing guava class, even if you provided it before. All you have todo is copy guava-18.jar into your deploy folder. The important part is, this needs to be done after bundle has been started and has complained about it. > Unable to read swagger annotations if the file is in another osgi bundle > ------------------------------------------------------------------------ > > Key: CXF-6904 > URL: https://issues.apache.org/jira/browse/CXF-6904 > Project: CXF > Issue Type: Bug > Components: JAX-RS, OSGi > Reporter: Christian Lutz > > I created a simple example to reproduce the error. > https://github.com/ChristianLutz/cxf-swagger-osgi-bug > ================= > JAX-RS Swagger2Feature OSGI Issue > ================= > This example is based on the code from > https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi > How to reproduce the issue: > mvn install (on the example) > bin/karaf (I used the current karaf 4.0.5) > > on karaf@root()> > feature:repo-add cxf 3.1.6 > feature:install cxf-rs-description-swagger2 > install mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-base/2.6.5 > install mvn:com.fasterxml.jackson.jaxrs/jackson-jaxrs-json-provider/2.6.5 > install -s mvn:de.kreeloo/cxf-swagger2-osgi-api/1.0.0 > install -s mvn:de.kreeloo/cxf-swagger2-osgi-impl/1.0.0 > > It may happen that one component is complaining about a missing guava class even if you provided it before. All you have todo is copy guava-18.jar into your deploy folder. I think this is a karaf bug. I have to create a ticket for. After you place the guava file into your deploy folder and type list, all bundles should be active. > Now open your web browser and type: > http://localhost:8181/cxf/swaggerSample/swagger.json > And all you see is the swagger header. > > I guess the problem is the ClasspathHelper.class from org.reflections it looks like that this one is not able to access the osgi component. > > The behavior is similar to this error description: > http://cxf.547215.n5.nabble.com/Swagger2Feature-via-blueprint-config-does-not-produce-the-expected-results-td5761841.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)