[jboss-jira] [JBoss JIRA] (AS7-6171) Confusing error message when an invalid element is added to host.xml

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Thu Dec 13 21:56:17 EST 2012


Brian Stansberry created AS7-6171:
-------------------------------------

             Summary: Confusing error message when an invalid element is added to host.xml
                 Key: AS7-6171
                 URL: https://issues.jboss.org/browse/AS7-6171
             Project: Application Server 7
          Issue Type: Enhancement
          Components: Domain Management
    Affects Versions: 7.1.3.Final (EAP)
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
            Priority: Minor
             Fix For: 7.2.0.CR1


I deliberately added an element <bogus/> to host.xml as part of testing something. I got this not very useful error message:

[Host Controller] 20:25:50,435 ERROR [org.jboss.as.host.controller] (Controller Boot Thread) JBAS010932: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
[Host Controller] 	at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:141) [jboss-as-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.host.controller.HostControllerConfigurationPersister.load(HostControllerConfigurationPersister.java:163) [jboss-as-host-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:399) [jboss-as-host-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:185) [jboss-as-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_37]
[Host Controller] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[4,5]
[Host Controller] Message: JBAS014725: Missing required element(s): MANAGEMENT
[Host Controller] 	at org.jboss.as.controller.parsing.ParseUtils.missingRequiredElement(ParseUtils.java:154) [jboss-as-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.host.controller.parsing.HostXml.readHostElement_1_1(HostXml.java:392) [jboss-as-host-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.host.controller.parsing.HostXml.readElement(HostXml.java:129) [jboss-as-host-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.as.host.controller.parsing.HostXml.readElement(HostXml.java:104) [jboss-as-host-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] 	at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69) [staxmapper-1.1.0.Final.jar:1.1.0.Final]
[Host Controller] 	at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:133) [jboss-as-controller-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]
[Host Controller] 	... 4 more

The parser should detect the invalid element and fail with the unexpected element message.

Look for the same problem elsewhere as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list