I'm using Talend ESB Enterprise and am running a tJava that needs to look at an Environment variable. When I run it local on my machine I get the value no problem. When I push it to Karaf the value is null. I wrote some test code to make sure the value is set correctly on the bus and it is but whenever I run a job on Karaf I get null.
well, I expected a little bit more information. to help you. - how do you set the env. variable? as a jvm parameter? as an env. system variable? - what platform do you run on? did you export the env. variable? how do you start the esb runtime (bin/trun, bin/start, as a service?)? have fun Gabriel
I'm running the ESB on Ubuntu with JAVA 1.6 u32 and I am exporting the environment variable at the OS level. I've written a small test harness using java code to pull the variable and I get it through there but not the BUS. I start from bin/trun and no I am not pulling it in as a JVM paramater I should not half to since it is a System level variable System.getenv should work in that case. So just to be clear and give you more info below is the set of the OS variable export TEST=MYTESTVAR JAVA code in talend job context.new1 = System.getenv("TEST");
Hi, indeed seems this way it doesn't work under linux If you have an enterprise edition, you may fill a support request if that's a blocker, (well, at the end of the day you will need env variables in production deployment ) until then let's find a workaround.. Gabriel