Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0A0910EC1 for ; Thu, 22 Aug 2013 15:18:54 +0000 (UTC) Received: (qmail 97541 invoked by uid 500); 22 Aug 2013 15:18:54 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 97525 invoked by uid 500); 22 Aug 2013 15:18:54 -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 97514 invoked by uid 99); 22 Aug 2013 15:18:53 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Aug 2013 15:18:53 +0000 Date: Thu, 22 Aug 2013 15:18:53 +0000 (UTC) From: "Christian Schneider (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CXF-5228) Rest client reports interface not visible for service interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Christian Schneider created CXF-5228: ---------------------------------------- Summary: Rest client reports interface not visible for service interface Key: CXF-5228 URL: https://issues.apache.org/jira/browse/CXF-5228 Project: CXF Issue Type: Bug Components: JAX-RS Affects Versions: 2.7.6 Environment: OSGi Reporter: Christian Schneider Assignee: Christian Schneider Fix For: 3.0.0, 2.7.7 When using a rest client in blueprint in OSGi I get the following stacktrace: Caused by: java.lang.IllegalArgumentException: interface net.lr.tutorial.karaf.cxf.personservice.person.PersonService is not visible from class loader See this for the full trace: https://gist.github.com/cschneider/6156833 I debugged into it and found that the true execption is hidden. It happens in org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean.createWithValues(Object...) There is first tries to create the proxy using the classloader of the service interface. This fails as in the user classloader there is only the service interface but the proxy is also create for the cxf Client interface. So it fails when resolving cxf Client. This exception is swallowed and the context classloader is used to create the proxy. This classloader is not set so it reports the user service interface is not visible. This is not the root of the problem though. I fixed this by using a ProxyClassloader that contains the user classloader and the classloader of the JAXRSClientFactoryBean. So it then finds user classes as well as cxf classes. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira