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 92013200BA0 for ; Fri, 14 Oct 2016 16:16:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 90DFA160AFC; Fri, 14 Oct 2016 14:16:24 +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 E100D160AF4 for ; Fri, 14 Oct 2016 16:16:23 +0200 (CEST) Received: (qmail 12708 invoked by uid 500); 14 Oct 2016 14:16:22 -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 12603 invoked by uid 99); 14 Oct 2016 14:16:22 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Oct 2016 14:16:22 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 77ED22C4C72 for ; Fri, 14 Oct 2016 14:16:22 +0000 (UTC) Date: Fri, 14 Oct 2016 14:16:22 +0000 (UTC) From: "Colm O hEigeartaigh (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (CXF-6671) Ambiguous JAXRSServerFactoryBean.setApplication() breaks Spring injection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 14 Oct 2016 14:16:24 -0000 [ https://issues.apache.org/jira/browse/CXF-6671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colm O hEigeartaigh closed CXF-6671. ------------------------------------ > Ambiguous JAXRSServerFactoryBean.setApplication() breaks Spring injection > ------------------------------------------------------------------------- > > Key: CXF-6671 > URL: https://issues.apache.org/jira/browse/CXF-6671 > Project: CXF > Issue Type: Bug > Components: JAX-RS > Affects Versions: 3.0.7 > Reporter: Andrew Greenburg > Assignee: Sergey Beryozkin > Fix For: 3.1.5, 3.0.8, 3.2.0 > > > We're using a custom javax.ws.rs.core.Application implementation, "com.foo.BasicApplication", injected via Spring XML into a JAXRSServerFactoryBean. I've been seeing some inconsistent behavior at intialization. About half the time I get this: > {code} > WARN [] [org.springframework.beans.GenericTypeAwarePropertyDescriptor] - Invalid JavaBean property 'application' being accessed! Ambiguous write methods found next to actually used [public void org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setApplication(javax.ws.rs.core.Application)]: [public void org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setApplication(org.apache.cxf.jaxrs.model.ApplicationInfo)] > {code} > which complains about it, but in this case it still works. > The other half of the time I get this, and the application fails to start up: > {code} > org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.foo.BasicApplication' to required type 'org.apache.cxf.jaxrs.model.ApplicationInfo' for property 'application'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.foo.BasicApplication] to required type [org.apache.cxf.jaxrs.model.ApplicationInfo] for property 'application': no matching editors or conversion strategy found > at org.springframework.beans.AbstractNestablePropertyAccessor.convertIfNecessary(AbstractNestablePropertyAccessor.java:591) > at org.springframework.beans.AbstractNestablePropertyAccessor.convertForProperty(AbstractNestablePropertyAccessor.java:603) > at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:204) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1527) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226) > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) > ... 24 more > {code} > Is this not a supported configuration? I found a workaround of creating a wrapper class that proxies the setter call without the ambiguity, but it's not ideal. -- This message was sent by Atlassian JIRA (v6.3.4#6332)