You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2018/03/02 21:04:00 UTC

[jira] [Commented] (ARTEMIS-1720) Expose activemq.xsd to validate bootstrap.xml and management.xml

    [ https://issues.apache.org/jira/browse/ARTEMIS-1720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16384147#comment-16384147 ] 

Justin Bertram commented on ARTEMIS-1720:
-----------------------------------------

FWIW the code also validates the XML before it reads it (e.g. see [here|https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/FileDeploymentManager.java#L85] and [here|https://github.com/apache/activemq-artemis/blob/master/artemis-dto/src/main/java/org/apache/activemq/artemis/dto/XmlUtil.java#L98]).

> Expose activemq.xsd to validate bootstrap.xml and management.xml
> ----------------------------------------------------------------
>
>                 Key: ARTEMIS-1720
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1720
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: Lionel Cons
>            Assignee: Justin Bertram
>            Priority: Major
>             Fix For: 2.5.0
>
>
> As hinted in the documentation ("Configuration Reference" section), {{xmllint}} can be used to validate the Artemis configuration files.
> This works fine with {{broker.xml}}:
> {code}
> $ xmllint --schema ${ARTEMIS_HOME}/schema/artemis-server.xsd broker.xml --noout
> broker.xml validates
> {code}
> However, Artemis uses other XML configuration files like {{bootstrap.xml}} and {{management.xml}} and the same command fails to validate them:
> {code}
> $ xmllint --schema ${ARTEMIS_HOME}/schema/artemis-server.xsd bootstrap.xml --noout
> bootstrap.xml:19: element broker: Schemas validity error : Element '{http://activemq.org/schema}broker': No matching global declaration available for the validation root.
> bootstrap.xml fails to validate
> $ xmllint --schema ${ARTEMIS_HOME}/schema/artemis-server.xsd management.xml --noout
> management.xml:18: element management-context: Schemas validity error : Element '{http://activemq.org/schema}management-context': No matching global declaration available for the validation root.
> management.xml fails to validate
> {code}
> {{xmllint}} is a very useful tool to catch configuration errors and all the XML configuration files used by Artemis should be validated this way.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)