Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-2044

Schema for cluster-connectionType should be xsd:all not xsd:sequence

    XMLWordPrintable

Details

    • Story
    • Resolution: Unresolved
    • Minor
    • None
    • AMQ 7.2.1.GA, AMQ 7.2.1 Image 1.0.GA
    • configuration
    • None

    Description

      When updating the broker.xml configuration according to the artemis-configuration.xsd schema at the moment for cluster-connections you MUST adhere to the ordering of the cluster-connectionType elements or if not you receive an 'Invalid configuration' upon startup.

      For example, this is a correct sequence:

      <cluster-connection name=\"my-cluster\">
      <connector-ref>artemis</connector-ref>
      <retry-interval>1000</retry-interval>
      <retry-interval-multiplier>2.0</retry-interval-multiplier>
      <max-retry-interval>600000</max-retry-interval>
      <initial-connect-attempts>20</initial-connect-attempts>
      <reconnect-attempts>10</reconnect-attempts>
      

      However if we were to change the order so it does not match the xsd:

      <cluster-connection name=\"my-cluster\">
      <connector-ref>artemis</connector-ref>
      <max-retry-interval>600000</max-retry-interval>
      <initial-connect-attempts>20</initial-connect-attempts>
      <reconnect-attempts>10</reconnect-attempts>
      <retry-interval>1000</retry-interval>
      <retry-interval-multiplier>2.0</retry-interval-multiplier>
      

      We would get something similar to the following:

      2018-10-11 17:45:28,633 ERROR [org.apache.activemq.artemis.core.client] AMQ214019: Invalid configuration: org.xml.sax.SAXParseException; cvc-complex-type.2.4.a: Invalid content was found starting with element 'initial-reconnect-attempts'. One of '{"urn:activemq:core":use-duplicate-detection, "urn:activemq:core":forward-when-no-consumers, "urn:activemq:core":message-load-balancing, "urn:activemq:core":max-hops, "urn:activemq:core":confirmation-window-size, "urn:activemq:core":producer-window-size, "urn:activemq:core":call-failover-timeout, "urn:activemq:core":notification-interval, "urn:activemq:core":notification-attempts, "urn:activemq:core":scale-down-connector, "urn:activemq:core":static-connectors, "urn:activemq:core":discovery-group-ref}' is expected.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:453) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3231) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1791) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.beginNode(DOMValidatorHelper.java:277) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:244) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.jaxp.validation.DOMValidatorHelper.validate(DOMValidatorHelper.java:190) [rt.jar:1.8.0_161]
          at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:109) [rt.jar:1.8.0_161]
          at javax.xml.validation.Validator.validate(Validator.java:124) [rt.jar:1.8.0_161]
          at org.apache.activemq.artemis.utils.XMLUtil.validate(XMLUtil.java:331) [artemis-core-client-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.core.config.FileDeploymentManager.readConfiguration(FileDeploymentManager.java:85) [artemis-server-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:68) [artemis-cli-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82) [artemis-cli-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149) [artemis-cli-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97) [artemis-cli-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124) [artemis-cli-2.6.3.redhat-00004.jar:2.6.3.redhat-00004]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_161]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_161]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161]
          at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161]
          at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129) [artemis-boot.jar:2.6.3.redhat-00004]
          at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49) [artemis-boot.jar:2.6.3.redhat-00004]
      
      
      Invalid configuration
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-rkieley Roderick Kieley
              rhn-support-rkieley Roderick Kieley
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified