Hi all,

I have deployed a Spring Camel context on a stock Karaf container.
I have set a env variable like this:

JBossFuse:admin@devTL> env test
null
JBossFuse:admin@devTL> env test hi_all
JBossFuse:admin@devTL> env test
hi_all
JBossFuse:admin@devTL>

Now I want to access this variable via:

String test = exchange.getContext().resolvePropertyPlaceholders("{{env:test}}");

Unfortunatley this always returns 
java.lang.IllegalArgumentException: Property with key [env:test] using function 
[env] returned null value which is not allowed, from input: {{env:test}}

also I tried {{karaf.test}}
String test = 
exchange.getContext().resolvePropertyPlaceholders("{{karaf.test}}");

But I get

java.lang.IllegalArgumentException: PropertiesComponent with name properties 
must be defined in CamelContext to support property placeholders. Property with 
key [karaf.test] not found in properties from text: {{karaf.test}}

Meanwhile
String test = 
exchange.getContext().resolvePropertyPlaceholders("{{karaf:test}}");
Returns simply "test"


Any suggestions or is this simply not possible?

Best
Thomas Leber
[email protected]
    

Reply via email to