[jboss-jira] [JBoss JIRA] (WFLY-6938) Startup error messages caused by expression where expressions are not allowed are confusing

Brian Stansberry (Jira) issues at jboss.org
Tue Jun 16 09:47:01 EDT 2020


    [ https://issues.redhat.com/browse/WFLY-6938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14160069#comment-14160069 ] 

Brian Stansberry commented on WFLY-6938:
----------------------------------------

This looks like two separate issues.

 

The host.xml one would belong in WFCORE.  Probably good to check it's still an issue first though.

 

The main one, generally if an expression is not supported it's because the attribute is a model reference, and for such an attribute the wiring should be converted to use capabilities, which will result in a capability violation message.  I think has been done for EE concurrency.

I'm reluctant to start blanket rejecting text that looks like an expression because we think it's wrong, as perhaps it's valid text for some case. Perhaps the capability resolution handling could handle that a bit better though and provide a slightly different failure message if it finds expression text in the unresolvable capability name.  That too would be something that should be tracked in WFCORE.

> Startup error messages caused by expression where expressions are not allowed are confusing
> -------------------------------------------------------------------------------------------
>
>                 Key: WFLY-6938
>                 URL: https://issues.redhat.com/browse/WFLY-6938
>             Project: WildFly
>          Issue Type: Enhancement
>          Components: Server
>    Affects Versions: 10.1.0.CR1
>            Reporter: Ondrej Chaloupka
>            Assignee: Lukas Vydra
>            Priority: Minor
>
> 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
> {code}
> /subsystem=ee/managed-executor-service=default:write-attribute(name=context-service, value="${my.context.service}")
> {code}
> ends with this error message during startup
> {code}
> 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}]"]}
> {code}
> another confusion is setting name of host in {{host-slave.xml}} file. When set as 
> {code}
> <host xmlns="urn:jboss:domain:4.2" host="${host.name}">
> {code}
> then NullPointerException is thrown.
> {code}
> [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
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list