Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-691

Can not parse a wrapped properties attribute inside a group

    Details

      Description

      Attribute definition is:

              static final PropertiesAttributeDefinition WRAPPED_PROPERTIES_IN_GROUP = new PropertiesAttributeDefinition.Builder(
                      "wrapped-properties-in-group", true)
                      .setWrapXmlElement(true)
                      .setWrapperElement("wrapped-properties")
                      .setXmlName("property")
                      .setAttributeGroup("mygroup")
                      .setAllowExpression(true)
                      .build();
      

      Corresponding XML representation is:

              <mygroup other-attribute-in-group="foo">
                  <wrapped-properties>
                      <property name="prop1" value="val1"/>
                      <property name="prop2" value="val2"/>
                  </wrapped-properties>
              </mygroup>
      

      XML parsing fails with:

      Message: WFLYCTL0198: Unexpected element '{urn:jboss:domain:test:1.0}mygroup' encountered
              at org.jboss.as.controller.parsing.ParseUtils.unexpectedElement(ParseUtils.java:89)
              at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:240)
              at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:159)
              at org.jboss.as.controller.PersistentResourceXMLDescription.parseChildren(PersistentResourceXMLDescription.java:259)
              at org.jboss.as.controller.PersistentResourceXMLDescription.parse(PersistentResourceXMLDescription.java:159)
              at org.jboss.as.controller.PersistentResourceXMLParser.readElement(PersistentResourceXMLParser.java:41)
              at org.jboss.as.controller.PersistentResourceXMLParser.readElement(PersistentResourceXMLParser.java:35)
              at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
              at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
              at org.jboss.as.controller.persistence.PersistentResourceXMLParserTestCase.testGroups(PersistentResourceXMLParserTestCas
      e.java:147)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ctomc Toma┼ż Cerar
                  Reporter:
                  jmesnil Jeff Mesnil
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: