JBossWS CXF throws javax.xml.transform.TransformerFactoryConfigurationError: Provider net.sf.saxon.TransformerFactoryImpl not found

Solution Verified - Updated -

Issue

  • An application has code that invokes an XSL transform like the below

    System.setProperty("javax.xml.transform.TransformerFactory", "net.sf.saxon.TransformerFactoryImpl");
    TransformerFactory tfactory = TransformerFactory.newInstance(); 
    
  • In a completely separate application there is a JAX-WS endpoint being deployed, but when a WSDL request is received, the following exception occurs:

javax.xml.transform.TransformerFactoryConfigurationError: Provider net.sf.saxon.TransformerFactoryImpl not found
    javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
    org.apache.cxf.helpers.XMLUtils.newTransformer(XMLUtils.java:120)
    org.apache.cxf.wsdl11.SchemaSerializer.writeXml(SchemaSerializer.java:56)
    org.apache.cxf.wsdl11.SchemaSerializer.marshall(SchemaSerializer.java:49)
    com.ibm.wsdl.xml.WSDLWriterImpl.printExtensibilityElements(WSDLWriterImpl.java:989)
    com.ibm.wsdl.xml.WSDLWriterImpl.printTypes(WSDLWriterImpl.java:882)
    com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(WSDLWriterImpl.java:131)
    com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(WSDLWriterImpl.java:1064)
    com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(WSDLWriterImpl.java:1029)
    org.apache.cxf.frontend.WSDLGetInterceptor.writeResponse(WSDLGetInterceptor.java:244)
    org.apache.cxf.frontend.WSDLGetInterceptor.handleMessage(WSDLGetInterceptor.java:122)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
    org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
    org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:169)
    org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
    org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:113)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
    org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x
  • JBossWS-CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In