5

I am trying to deploy a JAX-WS webservice on Tomcat. I am generating the war in Eclipse. The error I am getting on running Tomcat is -

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.

The offending xml file is

<?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>

Has anyone seen this error before please?

user2689782
  • 747
  • 14
  • 31

0 Answers0