我正在尝试在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>
有人见过这个错误吗?