I would recommend against using a file named cxf.xml for the web service
provider (that's best for the SOAP client or for more severe CXF
architectural changes on the provider side); typically you use a
cxf-servlet.xml file or another-named file as shown in Steps #7 and #8
here:  http://www.jroller.com/gmazza/date/20080417#WFstep7

HTH,
Glen


2008-05-19 Cord Awtry wrote:
> I've recently migrated from CXF 2.0.5 to 2.1. After getting the code to
> compile again, the app seems to run properly. Oddly, when I try to run a
> unit test that inits the service client, I get the error below.
> 
> Even after commenting out the complete contents of the cxf.xml in my
> WEB-INF/classes directory, I get the same error. The only solution is to
> delete the cxf.xml, but that neuters the services themselves.
> 
> Any thoughts on a potential change made between 2.0.5 and 2.1 that could
> cause this would be great.
> 
>   Thanks,
> 
>     -C-
> 
>     [junit] Testcase: testValidateOrder took 1.319 sec
>     [junit]     Caused an ERROR
>     [junit] org.springframework.beans.factory.BeanDefinitionStoreException:
> Unex
> pected exception parsing XML document from class path resource [cxf.xml];
> nested
>  exception is java.lang.AbstractMethodError:
> javax.xml.parsers.DocumentBuilderFa
> ctory.setFeature(Ljava/lang/String;Z)V
>     [junit] java.lang.RuntimeException:
> org.springframework.beans.factory.BeanDe
> finitionStoreException: Unexpected exception parsing XML document from class
> pat
> h resource [cxf.xml]; nested exception is java.lang.AbstractMethodError:
> javax.x
> ml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
>     [junit]     at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBu
> sFactory.java:96)
>     [junit]     at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBu
> sFactory.java:87)
>     [junit]     at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBu
> sFactory.java:65)
>     [junit]     at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBu
> sFactory.java:54)
>     [junit]     at
> org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
>     [junit]     at
> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java
> :106)
>     [junit]     at
> org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java
> :97)
>     [junit]     at
> org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(P
> roviderImpl.java:64)
>     [junit]     at javax.xml.ws.Service.<init>(Service.java:56)
>     [junit] Caused by:
> org.springframework.beans.factory.BeanDefinitionStoreExce
> ption: Unexpected exception parsing XML document from class path resource
> [cxf.x
> ml]; nested exception is java.lang.AbstractMethodError:
> javax.xml.parsers.Docume
> ntBuilderFactory.setFeature(Ljava/lang/String;Z)V
>     [junit]     at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> .doLoadBeanDefinitions(XmlBeanDefinitionReader.java:385)
>     [junit]     at
> org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefiniti
> onReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:
> 108)
>     [junit]     at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> .loadBeanDefinitions(XmlBeanDefinitionReader.java:313)
>     [junit]     at
> org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefiniti
> onReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:12
> 8)
>     [junit]     at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> .loadBeanDefinitions(XmlBeanDefinitionReader.java:290)
>     [junit]     at
> org.springframework.beans.factory.support.AbstractBeanDefinit
> ionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)
>     [junit]     at
> org.springframework.context.support.AbstractXmlApplicationCon
> text.loadBeanDefinitions(AbstractXmlApplicationContext.java:108)
>     [junit]     at
> org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefin
> itions(BusApplicationContext.java:229)
>     [junit]     at
> org.springframework.context.support.AbstractRefreshableApplic
> ationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:101)
>     [junit]     at
> org.springframework.context.support.AbstractApplicationContex
> t.obtainFreshBeanFactory(AbstractApplicationContext.java:394)
>     [junit]     at
> org.springframework.context.support.AbstractApplicationContex
> t.refresh(AbstractApplicationContext.java:324)
>     [junit]     at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApp
> licationContext.java:86)
>     [junit]     at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBu
> sFactory.java:93)
>     [junit] Caused by: java.lang.AbstractMethodError:
> javax.xml.parsers.Document
> BuilderFactory.setFeature(Ljava/lang/String;Z)V
>     [junit]     at
> org.apache.cxf.bus.spring.TunedDocumentLoader.createDocumentB
> uilderFactory(TunedDocumentLoader.java:127)
>     [junit]     at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.l
> oadDocument(DefaultDocumentLoader.java:68)
>     [junit]     at
> org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(Tu
> nedDocumentLoader.java:117)
>     [junit]     at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader
> .doLoadBeanDefinitions(XmlBeanDefinitionReader.java:361)
>     [junit]

Reply via email to