Bug 1722951

Summary: [GSS](6.4.z) beans.xml schema validation should not require internet
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: CDI/WeldAssignee: Romain Pelisse <rpelisse>
Status: CLOSED UPSTREAM QA Contact: Matej Novotny <manovotn>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: bbaranow, fweimer, jharting, maschmid, pmackay, rpelisse
Target Milestone: ---   
Target Release: EAP 6.4.23   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:59:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1699388, 1722955, 1797104    
Attachments:
Description Flags
BZ1722951.war none

Description Brad Maxwell 2019-06-21 19:31:19 UTC
when you use the standard beans.xml schema location in your beans.xml (referencing http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd) then WELD tries to look it up on the internet.  Oracle has had some technical issues with their web servers and returns an html error page when accessing the URL, leading to applications failing to deploy with:

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."app.ear"."web.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."app.ear"."web.war".PARSE: JBAS018733: Failed to process phase PARSE of subdeployment "web.war" of deployment "app.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:184) [jboss-as-server-7.5.18.Final-redhat-1.jar:7.5.18.Final-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_212]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_212]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_212]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: SAXException parsing vfs:/content/app.ear/web.war/WEB-INF/classes/META-INF/beans.xml
        at org.jboss.as.weld.deployment.BeansXmlParser.parse(BeansXmlParser.java:101)
        at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.parseBeansXml(BeansXmlProcessor.java:139)
        at org.jboss.as.weld.deployment.processors.BeansXmlProcessor.deploy(BeansXmlProcessor.java:110)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.18.Final-redhat-1.jar:7.5.18.Final-redhat-1]
        ... 5 more
Caused by: org.xml.sax.SAXParseException; Premature end of file.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:175)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:203)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:551)
        at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:654)
        at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:523)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:1800)
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:521)
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:554)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2526)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:724)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:283)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:733)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1754)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
        at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:289)
        at org.jboss.as.weld.deployment.BeansXmlParser.parse(BeansXmlParser.java:95)
        ... 8 more

Comment 3 Florian Weimer 2019-06-24 09:27:40 UTC
The validator needs to bundle the required XML schema definitions (matching those that are implemented in the code) and not fetch missing schema definitions from the network.  These URLs are intended as unique identifiers, not as locations for fetching the schema definitions.

Some background information for a different schema definition is available here: https://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/

Comment 4 Brad Maxwell 2020-01-31 21:52:48 UTC
Created attachment 1656816 [details]
BZ1722951.war

Comment 7 Romain Pelisse 2020-05-20 14:50:36 UTC
https://github.com/jbossas/jboss-eap/pull/3131 has been merged, marking as MODIFIED.

Comment 8 Peter Mackay 2020-06-30 12:18:35 UTC
Verified with EAP 6.4.23.CP.CR2

Comment 10 Red Hat Bugzilla 2025-02-10 03:59:47 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.