I got the solution from JB of the Karaf team: https://twitter.com/jbonofre/status/360956634098442242; we need to remove XercesImpl from the Karaf 2.3.2 lib/endorsed folder. I tested it and CXF runs fine now.

Glen

On 07/26/2013 04:57 PM, Glen Mazza wrote:
Hi, I'm testing my WSDL-first web service tutorial ( http://www.jroller.com/roller-ui/authoring/preview/gmazza/?previewEntry=web_service_tutorial) using CXF 2.7.6 on Karaf 2.3.2. When running CXF 2.7.6 on Karaf 2.3.1 everything works fine, but Karaf 2.3.2 won't allow me to load my web service provider, reporting this error in karaf.log when I try an osgi:start on the WSP:

Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:110)[:2.2.0] at org.apache.cxf.helpers.DOMUtils.getDocumentBuilder(DOMUtils.java:84)
    at org.apache.cxf.helpers.DOMUtils.createDocument(DOMUtils.java:102)
    at org.apache.cxf.staxutils.StaxUtils.read(StaxUtils.java:1113)
at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:245) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:203)

I don't know if the issue is that Karaf needs to restore a bundle in 2.3.2 that it had in 2.3.1, or if CXF needs to compensate by adding that bundle into its cxf-jaxws feature, *or* if I need to load an additional feature now besides cxf-jaxws.

The steps I run are here:
http://www.jroller.com/roller-ui/authoring/preview/gmazza/?previewEntry=web_service_tutorial#WFstep1
http://www.jroller.com/roller-ui/authoring/preview/gmazza/?previewEntry=web_service_tutorial#WFstep8

Or, more succinctly:
features:addurl mvn:org.apache.cxf.karaf/apache-cxf/2.7.6/xml/features
features:install cxf-jaxws
(change endpoint URL in the WSDL to the Karaf one, as mentioned in Step #4)
mvn clean install
install mvn:org.gmazza.blog-samples.web-service-tutorial/web-service-tutorial-service/1.0-SNAPSHOT
start bundle #
install mvn:org.gmazza.blog-samples.web-service-tutorial/web-service-tutorial-client/1.0-SNAPSHOT
start bundle #

With the failure occurring in Karaf 2.3.2 upon starting the service bundle (didn't bother with the client at that stage.)

Any suggestions?

Thanks,
Glen


Reply via email to