Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-8437

If required attribute in element is missing then syntax error occur only for attribute "name"

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 7.1.0.DR10
    • Management
    • None

      XSD for messaging-activemq subsystem defines element jms-queue with 2 required attributes: name, entries:

      <xs:element name="jms-queue" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                          <xs:attribute name="name" type="xs:string" use="required" />
                          <xs:attribute name="entries" type="stringList" use="required" />
      ...
                      </xs:complexType>
                  </xs:element>
      

      if attribute name is missing then server boot fails with:

      =========================================================================
      
        JBoss Bootstrap Environment
      
        JBOSS_HOME: /home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/scripts/server1/jboss-eap
      
        JAVA: /home/mnovak/Downloads/jdk1.8.0_71/bin/java
      
        JAVA_OPTS:  -server -verbose:gc -Xloggc:"/home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/scripts/server1/jboss-eap/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
      
      =========================================================================
      
      10:45:18,718 INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.0.Beta3-redhat-1
      10:45:19,031 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.7.Final-redhat-1
      10:45:19,133 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: JBoss EAP 7.1.0.Alpha1 (WildFly Core 3.0.0.Alpha17-redhat-1) starting
      10:45:19,300 INFO  [org.jboss.as.domain.management] (MSC service thread 1-6) WFLYDM0136: Registered OpenSSL provider
      10:45:20,353 ERROR [org.jboss.as.controller] (Controller Boot Thread) 
      
      OPVDX001: Validation error in standalone-full-ha.xml ---------------------------
      |
      |  390:     <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
      |  391:     <jms-queue name="TestQueue" entries="java:/jms/queue/TestQueue"/>
      |  392:     <connection-factory entries="java:/ConnectionFactory" connectors="in-vm"/>
      |           ^^^^ Missing required attribute(s): name
      |
      |  393:     <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
      |  394:     <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
      |  395: </server>
      |
      | The primary underlying error message was:
      | > ParseError at [row,col]:[392,17]
      | > Message: WFLYCTL0133: Missing required attribute(s): name
      |
      |-------------------------------------------------------------------------------
      
      10:45:20,355 ERROR [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0055: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: WFLYCTL0085: Failed to parse configuration
      	at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:143) [wildfly-controller-3.0.0.Alpha17-redhat-1.jar:3.0.0.Alpha17-redhat-1]
      	at org.jboss.as.server.ServerService.boot(ServerService.java:373) [wildfly-server-3.0.0.Alpha17-redhat-1.jar:3.0.0.Alpha17-redhat-1]
      	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:314) [wildfly-controller-3.0.0.Alpha17-redhat-1.jar:3.0.0.Alpha17-redhat-1]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]
      
      10:45:20,358 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
      10:45:20,380 INFO  [org.jboss.as] (MSC service thread 1-5) WFLYSRV0050: JBoss EAP 7.1.0.Alpha1 (WildFly Core 3.0.0.Alpha17-redhat-1) stopped in 13ms
      

      but if entries is missing then server does not fail when parsing xml config:

      =========================================================================
      
        JBoss Bootstrap Environment
      
        JBOSS_HOME: /home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/scripts/server1/jboss-eap
      
        JAVA: /home/mnovak/Downloads/jdk1.8.0_71/bin/java
      
        JAVA_OPTS:  -server -verbose:gc -Xloggc:"/home/mnovak/hornetq_eap6_dev/internal/eap-tests-hornetq/scripts/server1/jboss-eap/standalone/log/gc.log" -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=3M -XX:-TraceClassUnloading -Xms1303m -Xmx1303m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
      
      =========================================================================
      
      10:46:07,841 INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.0.Beta3-redhat-1
      10:46:08,170 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.7.Final-redhat-1
      10:46:08,286 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: JBoss EAP 7.1.0.Alpha1 (WildFly Core 3.0.0.Alpha17-redhat-1) starting
      10:46:08,460 INFO  [org.jboss.as.domain.management] (MSC service thread 1-3) WFLYDM0136: Registered OpenSSL provider
      10:46:09,880 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
      10:46:09,931 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 17) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
      10:46:09,980 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 5) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "messaging-activemq"),
          ("server" => "default"),
          ("jms-queue" => "TestQueue")
      ]) - failure description: "WFLYCTL0155: 'entries' may not be null"
      10:46:10,154 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) "WFLYCTL0193: Failed executing subsystem messaging-activemq boot operations"
      10:46:10,155 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("parallel-subsystem-boot") failed - address: ([]) - failure description: "\"WFLYCTL0193: Failed executing subsystem messaging-activemq boot operations\""
      10:46:10,161 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
      10:46:10,188 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0050: JBoss EAP 7.1.0.Alpha1 (WildFly Core 3.0.0.Alpha17-redhat-1) stopped in 14ms
      

      Expected result: If entries is missing then server boot will fail with the same error as if attribute name is missing. VDX will provide information that entries attribute is missing.

      Attaching standalone-full-ha.xml to reproduce the issue.

              bstansbe@redhat.com Brian Stansberry
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: