Thanks for the info Sergey. Yes, it is indeed a jaxrs problem, not a jaxws problem. I tried your suggestions. I removed this line
<import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/> from my cxf-beans.xml. I also made sure my .war file contains no cxf jars. I started with a fresh Jboss 6 installation and copied cxf-bundle-jaxrs-2.3.1.jar and cxf-rt-frontend-jaxrs-2.3.1.jar into common/lib, and also copied my spring*.jar files into common/lib, but I still get this error when I start Jboss: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/cxf-beans.xml]; nested exception is org.springframework.beans.FatalBeanException: Class [org.apache.cxf.jaxrs.spring.NamespaceHandler] for namespace [http://cxf.apache.org/jaxrs] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412) ... Any ideas? Thanks, Matt From: Sergey Beryozkin [mailto:[email protected]] Sent: Thursday, April 14, 2011 5:58 AM To: [email protected] Cc: Alessio Soldano; Matt Shostak Subject: Re: cxf 2.3.1 and JBoss 6 problem Hi Haven't seen it was about the problem with CXF JAX-RS imports. Yes, remove that import, and if you'd like to use CXF JAX-RS then you'll probably need to copy cxf jaxrs bundle or frontend only to the common lib area Cheers, Sergey On Thu, Apr 14, 2011 at 11:45 AM, Alessio Soldano <[email protected]<mailto:[email protected]>> wrote: JBoss AS 6 includes JBossWS-CXF by default, which internally used Apache CXF for jaxws functionalities. The jax-rs libs of CXF are not pulled in because of RestEasy. You're right in not including the cxf libs in your deployment; please take a look at the jbossws-cxf documentation regarding how to setup your endpoint using the spring configuration: http://community.jboss.org/wiki/JBossWS-StackCXFUserGuide#Server_Side_Integration_Customization . In particular, make sure Spring is installed on your JBoss AS, you should not need those imports in the beans file and check your web.xml (again see the documentation, http://community.jboss.org/docs/DOC-13972#Web_Service_Endpoints) An alternative is to install JBossWS-Native to JBoss AS 6 and go on using your app the way it is. Cheers Alessio On 04/13/2011 10:02 PM, Matt Shostak wrote: Hi, I'm trying to deploy my .war file on Jboss 6. It works on Jboss 5.1.0. I was building with CXF 2.2.10 and Spring 3.0.1. Since Jboss 6 uses CXF 2.3.1, I changed the build to use CXF 2.3.1 and Spring 3.0.5. I've also set it so that none of the CXF jars are included in my .war. When I put my new .war file in server/default/deploy and start Jboss, I get this error: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml] Offending resource: ServletContext resource [/WEB-INF/cxf-beans.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) The cxf-extension-jaxrs-binding.xml used to be found in cxf-bundle-jaxrs-2.2.10.jar back when I was building with 2.2.10 for Jboss 5.1.0. Now for Jboss 6, however, that xml file does not exist among the cxf*.jar files in common/lib. My cxf-beans.xml file has the following: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:context="http://www.springframework.org/schema/context" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> Obviously cxf-extension-jaxrs-binding.xml is now a problem, but if I simply remove that line from cxf-beans.xml I get a new error: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://cxf.apache.org/jaxrs] Offending resource: ServletContext resource [/WEB-INF/cxf-beans.xml] So can anyone tell me how exactly am I supposed to refer to these cxf*.xml files in my cxf-beans.xml? Any help would be greatly appreciated. Thanks, Matt -- Alessio Soldano Web Service Lead, JBoss -- Sergey Beryozkin Application Integration Division of Talend<http://www.talend.com> http://sberyozkin.blogspot.com
