JAXP Issue after updating JDK to 1.8u161 in JBoss EAP

Solution Verified - Updated -

Issue

I am getting below error in the automation script (snippet below) when using JDK1.8.0_181, it works fine with JDK1.8.0_112

import org.jboss.as.cli.scriptsupport.*
cli = CLI.newInstance()
Caught: javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__SAXParserFactory not found
javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__SAXParserFactory not found
        at jdk.xml.internal.JdkXmlUtils.getSAXFactory(JdkXmlUtils.java:235)
        at jdk.xml.internal.JdkXmlUtils.<clinit>(JdkXmlUtils.java:78)
        at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.<init>(SchemaParsingConfig.java:319)
        at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.<init>(SchemaParsingConfig.java:254)
        at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.<init>(XSDHandler.java:480)
        at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.<init>(XSDHandler.java:487)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(XMLSchemaLoader.java:357)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(XMLSchemaLoader.java:292)
        at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.<init>(XMLSchemaFactory.java:97)
        at __redirected.__SchemaFactory.<clinit>(__SchemaFactory.java:65)
        at __redirected.__JAXPRedirected.initAll(__JAXPRedirected.java:94)
        at org.jboss.modules.Module$1.run(Module.java:137)
        at org.jboss.modules.Module$1.run(Module.java:124)
        at org.jboss.modules.Module.<clinit>(Module.java:124)
        at org.jboss.as.cli.embedded.EmbeddedControllerHandlerRegistrar.<clinit>(EmbeddedControllerHandlerRegistrar.java:71)
        at org.jboss.as.cli.impl.CommandContextImpl.initCommands(CommandContextImpl.java:631)
        at org.jboss.as.cli.impl.CommandContextImpl.<init>(CommandContextImpl.java:339)
        at org.jboss.as.cli.impl.CommandContextFactoryImpl.newCommandContext(CommandContextFactoryImpl.java:44)
        at org.jboss.as.cli.scriptsupport.CLI.initOfflineContext(CLI.java:278)
        at org.jboss.as.cli.scriptsupport.CLI.<init>(CLI.java:53)
        at org.jboss.as.cli.scriptsupport.CLI.newInstance(CLI.java:62)
        at org.jboss.as.cli.scriptsupport.CLI$newInstance.call(Unknown Source)
        at jbStartStatusStop.run(jbStartStatusStop.groovy:18)
Caused by: java.lang.ClassNotFoundException: __redirected/__SAXParserFactory
        ... 23 more
Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:200)
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
        at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:232)
        at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:120)
        at __redirected.__DocumentBuilderFactory.<clinit>(__DocumentBuilderFactory.java:58)
        at __redirected.__JAXPRedirected.initAll(__JAXPRedirected.java:72)
        at org.jboss.modules.Module$1.run(Module.java:131)
        at org.jboss.modules.Module$1.run(Module.java:118)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.modules.Module.<clinit>(Module.java:118)
        at org.jboss.modules.Main.main(Main.java:387)
Caused by: java.lang.ClassNotFoundException: org/apache/xerces/jaxp/DocumentBuilderFactoryImpl
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at javax.xml.parsers.FactoryFinder.getProviderClass(FactoryFinder.java:124)
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:188)
        ... 10 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