variables in citrus-context not resolved

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

variables in citrus-context not resolved

Andréa Perez
Hello,
i try to create some template in a template.xml file that takes variable under ${variable} form, as a parameter.
Then, in citrus-context, i try to use that template with a call-template.

But when i try to use that parameter, I have a FailedToLoadApplicationContext Exception :
"Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'user' in string value "hello ${user}""

my template :
<citrus-test:template name="helloUser">
                <citrus-test:echo>
                        <citrus-test:message>hello ${user}</citrus-test:message>
                </citrus-test:echo>
        </citrus-test:template>

my call template in citrus-context :
<citrus:before-suite id="helloToto"><citrus:actions><citrus-test:call-template name="helloUser"> <citrus-test:parameter name="user" value="toto"></citrus-test:parameter></citrus-test:call-template></citrus:actions></citrus:before-suite>


How can I do to make this work ?
Thanks



Reply | Threaded
Open this post in threaded view
|

Re: variables in citrus-context not resolved

Christoph Deppisch
Administrator
You have a property placeholder configured in the Spring application context. This component raises the error as it can not resolve the user placeholder. You need to add ignoreUnresolvablePlaceholders property and set it to true. So the Spring placeholder configurer will ignore the unknown placeholder.
Reply | Threaded
Open this post in threaded view
|

Re: variables in citrus-context not resolved

Andréa
Ok thanks for your answer