Unless you’ve been living on a desert island for the last year, you’ve probably heard that you’ll need to upgrade ColdFusion’s JVM (java virtual machine) before March 11th 2007. Thats when daylight savings time takes effect this year. Since the dates have shifted in 2007, anything that is aware of daylight savings time will require an update. This includes your operating system (Windows, Linux, OSX, etc.), and Java since it has its own internal timezone tables.

And if you use NTP (network time protocol) to set the time on your servers from an internet time server, don’t think you’re immune. NTP simply syncs your internal UTC (universal time) clock with a UTC clock on the internet. Your timezone tables then determine your actual local time, based on your UTC offset, which changes during daylight savings time.

Updating ColdFusion’s JVM is very easy. The version of java that ColdFusion ships with is 1.4.2_09. You can see this if you login to your CF Administrator, then click on SYSTEM INFORMATION at the top of the page.

CF Administrator - Java details

Also note the Java Home setting, we’ll be changing that soon.

Adobe is recommending moving to version 1.4.2_11 of the java runtime. ColdFusion is certified to run on that version, although I have heard reports of it running just fine on later versions. But if you want to be able to use Adobe support – better stick to the _11 version.

You can download the necessary java runtime from http://java.sun.com/products/archive/index.html. Go down to the J2SDK/J2RE – 1.4 section, and choose the 1.4.2_11 version from the drop down box next to it. On the next page, click the Download J2SDK link. Accept the license agreement, then click on either the Windows or Linux download link.

For Windows, download the installer and run it, following the usual windows installer prompts. By default the new JRE will be installed in C:\j2sdk1.4.2_11

On Linux (RedHat, CentOS, Fedora or similar), download the rpm.bin file, then run the bin file – that is, at command shell, type ./j2sdk-1_4_2_11-linux-i586-rpm.bin in the directory you downloaded the file in. You may need to add execute permissions, if so you can do that with chmod 700 j2sdk-1_4_2_11-linux-i586-rpm.bin. After you page through and agree to the license, you will be left with the actual rpm file in the local directory. Install it like rpm -ivh j2sdk-1_4_2_11-linux-i586-rpm. Your new JRE will be installed in /usr/java/j2sdk1.4.2_11.

Now that the new java is installed, we just need to point ColdFusion to it. It is possible to change the java path in the CF administrator, but I don’t recommend it. First of all if you’ve made any hand edits to the jvm.config file, changing the java path through the administrator will wipe them out. Secondly, if something goes wrong you’ll need to put the old setting back, which you won’t be able to do through the administrator since ColdFusion won’t be running anymore.

So its best to just edit the jvm.config file directly. On Linux this is usually located at /opt/coldfusionmx7/runtime/bin/jvm.config. On Windows, look for C:\CFusionMX7\runtime\bin\jvm.config.

Near the top of the file you’ll see the java.home= line. Comment that out by placing a pound sign in front of it. Add a new line below it pointing java.home to our new JVM. The section of the file should look like this –

On Linux:
#java.home=/opt/coldfusionmx7/runtime/jre
java.home=/usr/java/j2sdk1.4.2_11/jre

On Windows:
#java.home=C:/CFusionMX7/runtime/jre
java.home=C:/j2sdk1.4.2_11/jre

Save the file, then restart ColdFusion. If you have problems getting ColdFusion to start up, go back into the file and remove your new line, and uncomment the old line. ColdFusion should then be able to start.

To verify you are running on the new version, log into the administrator again and look at the system information page.

ColdFusion administrator - java info - updated

Note that Java Home now references your new JRE installation. IMPORTANT NOTE – if you’ve imported any certificates into your java keystore, you’ll need to reimport them into your new Java installation. Importing a cert into the keystore usually happens as a result of needing to cfhttp to a self-signed-certificate SSL webserver.

Don’t forget to patch your OS, too. You can tell if your Linux machine has been updated by running zdump -v /etc/localtime | grep 2007. If you see some lines referencing March 11, you are good to go. If not, you can update your timezone tables by running the command yum update tzdata.

For Windows users – if you use Windows Update regularly I imagine you have the necessary update installed. If not, you can download the necessary update from http://support.microsoft.com/gp/cp_dst.

MySQL may or may not need to be updated, it can depend on the version and when it was installed. An easy way to check is to run this query:

SELECT UNIX_TIMESTAMP('2007-03-11 02:00:00'),
       UNIX_TIMESTAMP('2007-03-11 03:00:00')

You should get back the same timestamp for both results, even though you are specifying different times – 2:00am and 3:00am. This is because the 1hr time change occurs at 2:00am.

If you get back different values, your MySQL timezone tables may need reloaded. You can do that with this command:

mysql_tzinfo_to_sql /usr/share/zoneinfo|mysql mysql -p

37 Comments

  1. tony petruzzi says:

    Excellent!!!!!!!!!!!

    I can’t believe it’s that easy to update. I’ve been meaning to do this (nothing like waiting till the 11th hour), but I couldn’t find easy to follow instructions on how to do it. Thank you once again.

  2. Peter Tilbrook says:

    I am running 1.6.0 with no issues at all.

  3. Will Fuller says:

    You mentioned:

    > Go down to the J2SDK/J2RE – 1.4 section, and choose
    > the 1.4.2_11 version from the drop down box next to
    > it. On the next page, click the Download J2SDK link.

    Would there be any issues with just downloading the JRE version and installing that, or do I need the entire SDK package? Are there resources in the SDK required by ColdFusion MX server?

  4. Ryan Stille says:

    Good question Will. The official Adobe technote says to use the SDK, and I’ve also read elsewhere that the JRE does NOT contain everything needed to run CF. So I would stick with the full SDK.

  5. Will Fuller says:

    @ Ryan:

    Thanks for the response. Between you and several other people I’ve asked, it’s starting to sound like a consensus that the whole SDK should be installed, not just the smaller JRE package.

  6. Mark Gordon says:

    Thank a bunch, I tried this with just the JRE yesterday and my CF bombed. Thanks again.

  7. RobW says:

    Thanks for this information, it saved me a lot of work!

  8. Aeros says:

    What about for people using CFMX 6? Same steps?

    Thanks

  9. Ryan Stille says:

    Yes, CFMX 6.1 Updater 1 is certified to run on the same Java version as CFMX 7 (Java 1.4.2_11). The steps for installing it will be the same.

    As far as editing the jvm.config file, I believe that step should be similar also.

  10. cami says:

    Thank you so much. I couldn’t find any easy instructions to do this and this saved me a lot of time and headache.

  11. Brigitte says:

    This was the best info on the subject I’ve found — worked like a charm on all 5 servers I had to address. Adobe should have this posted on their site, front and center (shame, shame, Adobe!)! !

  12. Alexander says:

    Great stuff, but whats the deal for a CF7 Multiserver Installation on JRun? Is it too late now that we’re going into March 12th?

  13. Ike Booker says:

    Ryan, thanks for the advice. It should be expanded, however, to note that a chief reason for the CF service not restarting after making the JVM.Config file change is the type of slash you are using in the path. The path uses forward slashses (“/”) as opposed to backslashes (“\”). This is VERY important.

  14. Thadeaus Shelton says:

    Thanks for the pointing out the way to get the correct JVM file. Couldn’t find it from Adobe or Sun sites directly.

    Only thing was for my Windows CF7 Multiserver environment I had to use “java.home=C:/j2sdk1.4.2_11” if I had the “/jre” CF services wouldn’t restart. That was the only useful piece of info from Adobe’s tech note: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=2d547983

  15. Joe says:

    From what I had read originally CF5 did not require the Java update. Is this not the case?

    We are still having problems where the time on CF has not updated by the OS has.

  16. Matt S says:

    Bump! Worked like a champ. Adobe’s site wasn’t near as simple to follow as your simple instructions. Thanks.

  17. Wes D says:

    Thanks Alot!!!! This was very easy. Can you make performance tuning this easy?

  18. Chris Dary says:

    Thanks for this. Very clear, concise, and cross-platform to boot. Excellently written, anonymous sir.

  19. mark says:

    Very thanks.
    It is very clear for us.
    It saved me a lot of work!

  20. Joe says:

    This is GREAT! Your a life saver!

  21. Jacob Steelsmith says:

    This update worked great for a problem I was having when I got into work today. Java still thought it was DST when it really wasn’t. Thanks!

  22. danzord says:

    Sweet pootie pie, it works! Toit loik a toigah!

  23. j.kent.r says:

    Would like to throw out that we just updated CFMX 7.0.2’s JRE to 1.6.0_05. We had to do this because the version of Linux we are using wouldn’t even let us open up and install JRE 1.42_11. So far everything seems to be running fine. *knocks on wood*

  24. Gary says:

    I have a big problem on upgrade JVM from 1.4.2 to 1.6.
    Initially, we used CF7 and default JVM1.4. It works well.
    Then as some reason, we upgraded JVM to 1.6. It works well also. But somehow web service can not work any more. It works when using JVM1.4.
    So, my question is: what should I do to let web service work with CF7 and JVM1.6?
    Thanks in advance.

  25. Drew says:

    Thankk you, Thank you, Thank you.

  26. Spills says:

    Do you know of any issues using 1.4.2_16 with CFMX 6.1 as I have heard it may fix cfhttp issues with SSL?

  27. Spills says:

    Just let you know we have 1.4.2_16 running on a production site for the last couple of days and all seems well. It did indeed fix at least one connection failure issue we were having with cfhttp over SSL.

    Thanks for the article.

  28. Kishor says:

    I've CF MX7 Server with JVM 1.4.2_05, so now from yesterday we see 1 hr difference (back).
    I'm planning to follow the instruction to move to 1.4.2_11.

    Platform: Windows 2003
    Server: MX7 (Java 1.4.2_05 is packaged within it)
    Installed Java: Java 6 – for the other major app running on same boxes.

    1. I know once I install 1.4.2_11 I need to boot the box
    Problem: I'm NOT allowed to reboot the box.

    So if I install 1.4.2_11 on other machine and copy the jre directory to prod box and then change the configuration to point to this jre directory, does it works?

    OR do I need to follow the Hot Fix patch.

    I prefer not to install 1.4.2_11  on OS along with Java 6, so How to put this 1.4.2_11 in the CF server MX7?

    Thanks for all your time and advice.

    Kishor

  29. Ryan Stille says:

    Kishor, you don't need to reboot after installing a new JVM.  You WILL need to restart ColdFusion though.

    As far as installing two different versions of Java at once, I can't help you because I've never done that.  I don't think it would be much of an issue, but I would do it on a test box first.

    I think copying over an installed SDK directory from another server would probably work fine, too.  It should be safe to try it.  At worst case CF won't come back up and you'll need to edit jvm.config to point back to the original JVM and then start again.

  30. Josh Knopp says:

    Kishor, I installed 1.4.2_11 today on my local machine and only had to restart CF, versus booting the box.  Trying this in a production environment may not be for the faint of heart, but I thought I'd share my experience, for what it's worth.  Good luck!

  31. Kishor says:

    Thanks Ryan!
    I'll try with jre copy approach tonight.
    I did try to update jvm.config to point Java 6 which is already installed for other application on that box, but CF MX7 did not start.

    Yes, I'm scared to install 2 versions of Java because other app (which is the main app) will not work below Java 6 and we have users on those servers 24/7 and at least 350 users.

    I'll post my update here.
    Again Thanks a lot for your quick response, appreciate it.

    -Kishor

  32. Kishor says:

    1. Installed 1.4.2_11 on my desktop
    2. Stop the server
    3. Replace "jre" directory on server with jre (1.4.2_11) on my desktop
    4. Start the server

    Everything fine. DST issue gone!!

    Thanks everybody!

    I'm new to ColdFusion, this is the Excellent article which made my life so easy and simple.
    Thanks again for everything!

  33. AP says:

    Thanks!!! I searched for such a long time for an article that is this clear!

  34. LoadWB says:

    For those still running CF5 (who is?!) I just upgraded to JRE 1.6 Update 12 and it caused the ColdFusion Application service to continually crash.  I back-peddled to 1.5 Update 17 and it works fine.  When more time is available I will try each release of 1.6 up until it fails.

  35. Lance says:

    How do I go about upgrading the JVM for coldfusion when I have a later version (1.5) installed on my system. Do I just install over the 1.5? Could I just copy the installation folder without an install so that I don't overwrite the 1.5?

  36. Ryan says:

    Upgrading is no different no matter what version you are currently at.  Install your new JVM into a new directory, then change your jvm.config file to reference it.

  37. Kerry Coyne says:

    I am running coldfusion MX 7 and was wondering what version of Java is supported on this.  I currently have 1.4.2_12 and see they have a version 19 out there, but can we run a new version than 1.4?  Any help would be appreciated.