在Tomcat中部署JAX-WS war时出错:无法解析名称';cxf豆:豆状物&x27;

在Tomcat中部署JAX-WS war时出错:无法解析名称';cxf豆:豆状物&x27;,tomcat,deployment,jax-ws,saxparseexception,Tomcat,Deployment,Jax Ws,Saxparseexception,我正在尝试在Tomcat上部署JAX-WS Web服务。我正在Eclipse中生成战争。我在运行Tomcat时遇到的错误是- SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDef

我正在尝试在Tomcat上部署JAX-WS Web服务。我正在Eclipse中生成战争。我在运行Tomcat时遇到的错误是-

SEVERE: Exception sending context initialized event to listener instance of class 
org.springframework.web.context.ContextLoaderListener 
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: 

Configuration problem: 
Failed to import bean definitions from relative location [ws/ws-context.xml]
Offending resource: ServletContext resource [/WEB-INF/spring/application-context.xml]; 

nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: ...  
nested exception is org.xml.sax.SAXParseException: 
src-resolve: Cannot resolve the name 'cxf-beans:beanAttributes' to a(n) 'attribute group' 
component.
有问题的xml文件是

<?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:util="http://www.springframework.org/schema/util"
    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-3.0.xsd
        http://cxf.apache.org/jaxrs 
        http://cxf.apache.org/schemas/jaxrs.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-xml.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <jaxrs:server id="restContainer" address="/">
        <jaxrs:serviceBeans>
            <ref bean="ABC" />
        </jaxrs:serviceBeans>
    </jaxrs:server>

</beans>


请问以前有人看到过这个错误吗?

您找到这个问题的解决方案了吗?将cxf-api.jar添加到您的类路径中