Bug 1192467

Summary: Inconsistent handling of system properties.
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Radovan Synek <rsynek>
Component: Domain ManagementAssignee: Emmanuel Hugonnet (ehsavoie) <ehugonne>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Simka <msimka>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: dandread, jmartisk, kkhan, myarboro, pkremens, rsynek
Target Milestone: ER3Keywords: Regression
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:44:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1192972    
Attachments:
Description Flags
server log excerpt none

Description Radovan Synek 2015-02-13 12:58:14 UTC
Created attachment 991368 [details]
server log excerpt

Description of problem:
Having a domain with a single server group and two eap hosts (all on localhost), following system property cause server to fail on startup:
<property name="org.jbpm.designer.perspective" value="${org.jbpm.designer.perspective:full}"/>

The problem occurs only in definition with possibility to override default value - <property name="X" value="${Y:default}"/>, where X = Y

Please see the error message in attached server log excerpt.

More interesting is the fact that the issue shows with domain mode only, standalone mode works with properties defined as above.

Version-Release number of selected component (if applicable):
6.4.0.GA (version.txt)

Comment 1 Martin Simka 2015-02-13 13:04:04 UTC
EAP 6.3.0 domain starts without issues with such system property definition

Comment 3 Brian Stansberry 2015-02-13 14:50:55 UTC
I'm curious -- was this ever meant to in some situation resolve to something other than "full"? IOW, is this style or writing an expression anything other than a mistake?

Comment 4 Brian Stansberry 2015-02-13 14:51:24 UTC
s/style or writing/style of writing/g

Comment 5 Radovan Synek 2015-02-13 15:05:17 UTC
It was supposed to use "full" as a default value, but the value can be override by defining the property at EAP startup, e.g. -Dorg.jbpm.designer.perspective=something_different

Anyway, as had been said, there is a difference between 6.4 and 6.3 and for 6.4, even between standalone and domain. In case an expression like this is no longer supported, please make sure it's properly documented and server in standalone mode should fail fast as well as in domain mode.

Comment 6 Martin Simka 2015-02-13 15:09:27 UTC
EAP 6.3.0

<property name="org.jbpm.designer.perspective" value="${org.jbpm.designer.perspective:full}"/>

[domain@localhost:9999 /] :resolve-expression-on-domain(expression="${org.jbpm.designer.perspective}")
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {
        "server-one" => {"response" => {
            "outcome" => "success",
            "result" => "${org.jbpm.designer.perspective:full}"
        }},
        "server-two" => {"response" => {
            "outcome" => "success",
            "result" => "${org.jbpm.designer.perspective:full}"
        }}
    }}}}
}

<property name="org.jbpm.designer.perspective" value="${file.separator:full}"/>

[domain@localhost:9999 /] :resolve-expression-on-domain(expression="${org.jbpm.designer.perspective}")
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {
        "server-one" => {"response" => {
            "outcome" => "success",
            "result" => "/"
        }},
        "server-two" => {"response" => {
            "outcome" => "success",
            "result" => "/"
        }}
    }}}}
}

<property name="org.jbpm.designer.perspective" value="${foo:full}"/>

[domain@localhost:9999 /] :resolve-expression-on-domain(expression="${org.jbpm.designer.perspective}")
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {
        "server-one" => {"response" => {
            "outcome" => "success",
            "result" => "full"
        }},
        "server-two" => {"response" => {
            "outcome" => "success",
            "result" => "full"
        }}
    }}}}
}

Comment 7 Brian Stansberry 2015-02-13 15:18:25 UTC
Another question:

Where is this system property declared in the domain configuration? First level child of domain.xml? First le

Comment 8 Radovan Synek 2015-02-13 15:26:17 UTC
domain -> system-properties -> property

Comment 9 Brian Stansberry 2015-02-13 15:29:17 UTC
Martin,

The 6.3.0 behavior with value="${org.jbpm.designer.perspective:full}" looks incorrect as well, as the resolved value is not "full".

Thanks, guys, for the info.

Comment 10 Kabir Khan 2015-02-18 10:52:44 UTC
Should be fixed by DMR upgrade https://bugzilla.redhat.com/show_bug.cgi?id=1192972

Comment 11 Martin Simka 2015-02-27 12:47:22 UTC
verified on EAP 6.4.0.ER3