Project and Portfolio Management Practitioners Forum
cancel

Unable to read JAVA_HOME when migrating sometimes

Highlighted
Alan Delimon
Super Contributor.

Unable to read JAVA_HOME when migrating sometimes

Hi all,
Sometimes we get an error when migrating, it shows up in our execution logs. We are running PPM 7.5, service pack 2.

The error is:
ERROR: JAVA_HOME environment variable is not set :-(.

This doesn't make sense, since I can login as the user who is running the PPM process, and read the JAVA_HOME variable. And most of the time, it works just fine. But intermittently, we see this error.

Any ideas, has anyone seen this before?
4 REPLIES
Niraj Prabhu
Outstanding Contributor.

Re: Unable to read JAVA_HOME when migrating sometimes

Hello Alan,

Quick question, are you on Windows or Unix for this environment?

If you are on windows, then did you check if the My Computer >> Properties >> Advanced >> Enviornment Variables >> JAVA_HOME value?

Also if you have cygwin installed then consider adding following lines to file,
/cygwin/etc/profile

JAVA_HOME=/cygdrive/c/Java/jdk1.6.0_16
export JAVA_HOME

Regards,
Niraj
Niraj P.
Alan Delimon
Super Contributor.

Re: Unable to read JAVA_HOME when migrating sometimes

We're on Solaris.

The value is found in the .profile, so it is definitely defined.

According to HP support, this error is a known issue that happens intermittently. That sounds about right - we've seen it maybe 4 or 5 times in the last year.

They've suggested hard coding JAVA_HOME in kVariables.sh as a failsafe. We will be implementing that in our production environment soon.
Niraj Prabhu
Outstanding Contributor.

Re: Unable to read JAVA_HOME when migrating sometimes

Alan,

This solution sounds good. Additionally have a additional step defined to modify kVariables file while you are upgrading the Java version.

-Niraj
Niraj P.
Cesar Roque
Respected Contributor.

Re: Unable to read JAVA_HOME when migrating sometimes

Are you in a cluster enviroment ?

If yes check each node, maybe there is a one where the java_home is not set for the PPM user.

Regards