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:
dir %JAVA_HOME%\bin\java.exe
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: 6.1.0.1200
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:
C:\Program Files\Java\jre7
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:
C:\Progra~1\Java\jre7
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!
Thanks for sharing, I bet I hit this soon!
Yes you might be cursed or something. I remember your July 4th issues clearly. Just kidding! :-). Well, at least this one won’t bother you anymore. Actually, it would be great if you confirm if you see the same issue.
Thanks buddy, thought I might need this 🙂
Hopefully, not anymore! 🙂
[…] and solution. I expect it to impact lots of people. Good thing someone figured it out and shared the […]