Illegal provider-class name: http\://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl when application packages jaxp implementation in JBoss EAP 7

Solution Verified - Updated -

Issue

Application packaging jaxp-ri-2.0.jar (Sun JAXP Implementation classes) is failing when application tries to create new JAXP SchemaFactory object with Illegal provider-class name: http://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl:

javax.xml.validation.SchemaFactoryConfigurationError: Provider for class javax.xml.validation.SchemaFactory cannot be created
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
...
Caused by: javax.xml.validation.SchemaFactoryConfigurationError: Provider for class javax.xml.validation.SchemaFactory cannot be created
    at javax.xml.validation.SchemaFactoryFinder.findServiceProvider(SchemaFactoryFinder.java:362)
    at javax.xml.validation.SchemaFactoryFinder._newFactory(SchemaFactoryFinder.java:219)
    at javax.xml.validation.SchemaFactoryFinder.newFactory(SchemaFactoryFinder.java:146)
    at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:213)
    at com.redhat.examples.servlet.Servlet.init(Servlet.java:52)
...
Caused by: java.util.ServiceConfigurationError: javax.xml.validation.SchemaFactory: vfs:/content/packaged-xml-parsers.war/WEB-INF/lib/jaxp-ri-2.0.jar/META-INF/services/javax.xml.validation.SchemaFactory:1: Illegal provider-class name: http\://www.w3.org/2001/XMLSchema=com.sun.org.apache.xerces.internal.jaxp.validation.xs.SchemaFactoryImpl
    at java.util.ServiceLoader.fail(ServiceLoader.java:239)
    at java.util.ServiceLoader.fail(ServiceLoader.java:245)
    at java.util.ServiceLoader.parseLine(ServiceLoader.java:272)
    at java.util.ServiceLoader.parse(ServiceLoader.java:307)
    at java.util.ServiceLoader.access$200(ServiceLoader.java:185)
    at java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:357)
    at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:393)
    at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:474)
    at javax.xml.validation.SchemaFactoryFinder$2.run(SchemaFactoryFinder.java:351)
    at javax.xml.validation.SchemaFactoryFinder$2.run(SchemaFactoryFinder.java:347)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.xml.validation.SchemaFactoryFinder.findServiceProvider(SchemaFactoryFinder.java:347)
    ... 29 more
...

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 7.1

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
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.