On 04/15/2011 04:41 PM, Matt Shostak wrote:
In Jboss 6 Final, there are cxf*.jar files located in common/lib and client.
There are also several jbossws-cxf*.jar files in a few deployer directories. I
had only been putting cxf-rt-frontend-jaxrs.jar in common/lib but now I've
placed it client as well. And the imports are back in my cxf-beans.xml. I
then tried running Jboss, but it got a failure because it couldn't find
Spring's ApplicationContextListener. So I added the Spring jars that are in my
.war to the common/lib area, and tried again.
OK, what you've done here would have been my suggestion, ie. given
you're willing to use jaxrs only, you deploy a war whose web.xml
references the jaxrs cxf servlet. Given jboss 6 does not come with the
cxf-jaxrs libs, you add them, as well as the spring ones.
This time I got this error, which is pretty much what I've been seeing in my
previous attempts throughout this ordeal:
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)
After this failure I put the Spring jars in the same places as the cxf jars,
and got the same failure again.
To me, it appears from this message that there's some sort of mismatch between
the cxf version and the spring version. I have cxf 2.3.1 and Spring 3.0.5. I
haven't found anything in the cxf documentation telling me one way or another
which version of Spring I can use.
As Sergey suggested, this seems like a classloader mismatch, given
org.apache.cxf.jaxrs.spring.NamespaceHandler extends
NamespaceHandlerSupport which implements that interface; perhaps you
have other Spring libraries on the server?
Alessio
--
Alessio Soldano
Web Service Lead, JBoss