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

Startup error messages caused by expression where expressions are not allowed are confusing

    Details

      Description

      When a property expression is used at place where expression usage is not allowed then error message which is shown is quite confusing. From user point of view (especially the newcomer) it would be nice if the error message shows the real reason - usage of expression at place where is not permitted.

      Maybe CLI could warn on usage of expression on place where is not allowed too.

      Documentation recommends configuration with CLI, editing of XML file is common too. More of it there are some tasks which are harder to be done with CLI and editing XML is faster/easier.

      Examples:
      Setting

      /subsystem=ee/managed-executor-service=default:write-attribute(name=context-service, value="${my.context.service}")
      

      ends with this error message during startup

      14:13:21,076 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "ee"),
          ("managed-executor-service" => "default")
      ]) - failure description: {
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.concurrent.ee.context.service.${my.context.service}"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.concurrent.ee.executor.default is missing [jboss.concurrent.ee.context.service.${my.context.service}]"]}
      

      another confusion is setting name of host in host-slave.xml file. When set as

      <host xmlns="urn:jboss:domain:4.2" host="${host.name}">
      

      then NullPointerException is thrown.

      [Host Controller] 14:18:45,238 ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0033: 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:131)
       at org.jboss.as.host.controller.HostControllerConfigurationPersister.load(HostControllerConfigurationPersister.java:188)
       at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:594)
       at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
       at java.lang.Thread.run(Thread.java:745)[Host Controller] Caused by: javax.xml.stream.XMLStreamException: ParseError
       at [row,col]:[3,1][Host Controller] Message: WFLYCTL0197: Unexpected attribute 'host' encountered
       at org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:117)
       at org.jboss.as.host.controller.parsing.HostXml_4.readHostElement(HostXml_4.java:311)
       at org.jboss.as.host.controller.parsing.HostXml_4.readElement(HostXml_4.java:170)
       at org.jboss.as.host.controller.parsing.HostXml.readElement(HostXml.java:79)
       at org.jboss.as.host.controller.parsing.HostXml.readElement(HostXml.java:50)
       at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:110)
       at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:69)
       at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:123) ... 4 more
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lvydra Lukas Vydra
                Reporter:
                ochaloup Ondrej Chaloupka
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: