Bug 1722951 - [GSS](6.4.z) beans.xml schema validation should not require internet
Summary: [GSS](6.4.z) beans.xml schema validation should not require internet
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CDI/Weld
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: EAP 6.4.23
Assignee: Romain Pelisse
QA Contact: Matej Novotny
URL:
Whiteboard:
Depends On:
Blocks: eap6423-payload 1722955 1797104
TreeView+ depends on / blocked
 
Reported: 2019-06-21 19:31 UTC by Brad Maxwell
Modified: 2025-02-10 03:59 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:59:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
BZ1722951.war (1.73 KB, application/octet-stream)
2020-01-31 21:52 UTC, Brad Maxwell
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WELD-988 0 Minor Resolved beans.xml schema validation should be configurable to turn if off 2020-08-26 16:24:18 UTC
Red Hat Knowledge Base (Solution) 4240421 0 Troubleshoot None SAXParseException; Premature end of file ... DeploymentUnitProcessingException: SAXException parsing ... beans.xml in JB... 2019-06-21 20:08:36 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.