While upgrading a vCAC (vCloud Automation Center) 6.0.1 environment to 6.1 a couple of days back, I hit this error message while upgrading the IaaS database, using the database upgrade script:
Java version 1.7 or higher (64-bit) must be installed, the environment variable JAVA_HOME must be sent to the Java install folder, and %JAVA_HOME%\bin\java.exe must exist.
Now, I had gone though the prerequisites so Java 1.7 64-bit was definitely installed and the JAVA_HOME environment variable was there and working too. In fact, I did a quick check by running:
and the result was as you would expect. Clearly, the error message was not true. Also, the message returned was a bit misleading in that it said:
Current database version: 18.104.22.1680
even though I thought the script had failed. Just to try my luck, I tried the IaaS upgrade anyway but sure enough, the installation put me back in my place by saying:
Fortunately, after a bit of head-scratching, I worked it out and it was quite silly in the end. It seems that if there are quotes in the JAVA_HOME variable, the database upgrade script can’t handle it. For Java, the default installation path is:
Due to the space in “Program Files”, one has to put quotes around the path, otherwise it doesn’t work. However, it seems that the database upgrade script can’t handle the quotes and bombs out.
Now maybe there is a better way of doing it but I got around the problem by modifying the JAVA_HOME variable to:
After that, running the database upgrade work perfectly and the result was what I expected to see in the first place:
Thought I should document this quickly in case someone else hits this issue as well. I know there will be quite a few upgrades going around these days!