JAVA_HOME is being set by the Autosys Agent
search cancel

JAVA_HOME is being set by the Autosys Agent

book

Article ID: 74503

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent

Issue/Introduction

We have done a lot of agent migrations to Build 979 and one of the agents was found loading the JAVA_HOME variable in run time. It is setting the value to /opt/CA/WorkloadAutomationAE/JRE_WA. We have already checked global/user profiles and profile.CA/auto.*. The job's profile attribute was also blank. How can we prevent the agent form setting the JAVA_HOME variable?

Environment

Workload Automation AE

Cause

If the agent is installed on the same server as the scheduler OR if there is a client installed with the agent, the JAVA_HOME gets set when the auto.profile gets sourced. In the auto.profile, we source the Autosys host environment script:

case $AUTOSERV in
ACE)
        AUTOUSER=/opt/CA/WorkloadAutomationAE/autouser.ACE
        test -f $AUTOUSER/autosys.sh.test-example.com &&
        . $AUTOUSER/autosys.sh.test-example.com <<<<<<<
        ;;
esac
 

Resolution

If you don't want the environment scripts specified in the auto.profile to set the JAVA_HOME environment variable, then comment out the following line in your autosys.sh.$HOSTNAME script, located in the $AUTOUSER directory: 

JAVA_HOME=/opt/CA/WorkloadAutomationAE/JRE_WA ; export JAVA_HOME