I have a problem using the Weblogic Action Pack. Whenever I try to invoke an Action from the Weblogic Action Pack, I get the error message, that JAVA_HOME is not set:
2014-12-10 14:22:32,847 [job-294912-jobServer-294912-6:WLS - Get Server(s) State (WLST)(P14348000.F14352000.E14353000):WLS - Get Server(s) State (WLST)] DEBUG (com.nolio.platform.shared.executables.actions.appserver.weblogic.util.exec.WlsCommandLineExecutor:336) - Executing command: [/opt/weblogic/wlserver/common/bin/wlst.sh /opt/catechnologies/ra5/ReleaseAutomationServer/NolioAgent/./files_temp/wls_scripts/wls_499138.py]
2014-12-10 14:22:32,869 [job-294912-jobServer-294912-6:WLS - Get Server(s) State (WLST)(P14348000.F14352000.E14353000):WLS - Get Server(s) State (WLST)] ERROR (com.nolio.platform.shared.executables.actions.appserver.weblogic.abstracts.WlsScriptActionBase:239) - JAVA_HOME is not set or does not exist
(Exit value: 1)
org.apache.commons.exec.ExecuteException: JAVA_HOME is not set or does not exist
Whenever I execute the same shell script (/opt/weblogic/wlserver/common/bin/wlst.sh) there is no problem to execute any WLST-Script. The agent is running as root and I also executed wlst.sh as root. I am running 5.0.2 with the latest Weblogic Action Pack and Weblogic 12.1.3.
I have currently no idea how commons exec is spinning of processes. So any help appreciated!
Could JAVA_HOME have been set after the agent was started? The agent only knows of environment variables/values at the startup time. You could run the “set” command against the agent to confirm which variables it has access to and if you think JAVA_HOME may have been set afterwards, a restart of the agent should pick it up.
Thanks for your answer. This directed me to the wrapper.conf file of the agent. I added the following line:
I am curious since there was no word in the documentation about setting the JAVA_HOME. But this works perfectly.
Good question about documentation. I'm not sure if JAVA_HOME is a requirement for the action or for running WLST scripts in general. I'll check on that.
Please open an issue with Support to resolve. reiju05
I don't see any reference to JAVA_HOME in the pack docs:
There may be a assumption that JAVA_HOME is set during JRE installation.