Return-Path: Delivered-To: apmail-incubator-cxf-issues-archive@locus.apache.org Received: (qmail 28439 invoked from network); 3 Dec 2007 13:40:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2007 13:40:12 -0000 Received: (qmail 1457 invoked by uid 500); 3 Dec 2007 13:40:00 -0000 Delivered-To: apmail-incubator-cxf-issues-archive@incubator.apache.org Received: (qmail 1446 invoked by uid 500); 3 Dec 2007 13:40:00 -0000 Mailing-List: contact cxf-issues-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cxf-dev@incubator.apache.org Delivered-To: mailing list cxf-issues@incubator.apache.org Received: (qmail 1434 invoked by uid 99); 3 Dec 2007 13:40:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 05:40:00 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Dec 2007 13:39:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4209071420A for ; Mon, 3 Dec 2007 05:39:43 -0800 (PST) Message-ID: <15568979.1196689183265.JavaMail.jira@brutus> Date: Mon, 3 Dec 2007 05:39:43 -0800 (PST) From: "willem Jiang (JIRA)" To: cxf-issues@incubator.apache.org Subject: [jira] Resolved: (CXF-1187) Using Spring spawns creation error on org.apache.cxf.transport.servlet.ServletTransportFactory In-Reply-To: <13981988.1194537950581.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] willem Jiang resolved CXF-1187. ------------------------------- Resolution: Fixed Fix Version/s: 2.1 2.0.4 This patch are in the trunk and 2.0.x-fixes branch. > Using Spring spawns creation error on org.apache.cxf.transport.servlet.ServletTransportFactory > ------------------------------------------------------------------------------------------------------------------------------ > > Key: CXF-1187 > URL: https://issues.apache.org/jira/browse/CXF-1187 > Project: CXF > Issue Type: Bug > Components: Integration > Affects Versions: 2.0.3 > Environment: JDK 1.6 > Reporter: Julien DUMETIER > Assignee: willem Jiang > Fix For: 2.0.4, 2.1 > > > Consider the simple following Spring context defintion XML file: > > xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:util="http://www.springframework.org/schema/util" > xmlns:context="http://www.springframework.org/schema/context" > xsi:schemaLocation=" > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > http://www.springframework.org/schema/util > http://www.springframework.org/schema/util/spring-util-2.5.xsd > http://www.springframework.org/schema/context > http://www.springframework.org/schema/context/spring-context-2.5.xsd > "> > > > > And the simple following laucher: > package test; > import org.springframework.context.support.ClassPathXmlApplicationContext; > public class MainTest { > public static void main(String[] args) { > new ClassPathXmlApplicationContext("classpath:test/context.xml"); > } > > } > All works fine. > But if you use new Spring annotation configuration capabilities, adding the following to the definition file: > > Then, you will get the following exception: > Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.cxf.transport.servlet.ServletTransportFactory#0': Injection of resource methods failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'activationNamespaces' is defined > Because org.apache.cxf.transport.http.AbstractHTTPTransportFactory shows the following annotation on the setter, although "No bean named 'activationNamespaces' is defined": > @Resource(name = "activationNamespaces") > public void setActivationNamespaces(Collection ans) { > activationNamespaces = ans; > } > Annotation config is now widely spread among Spring projects, and will become pervasive the new Spring 2.5 testing framework, based on a the annotation configuration capabilities. > A workaround is to add a collection of string named "activationNamespaces" to the context, adding the following: > > But cxf.xml should be refactored to avoid this. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.