This post is from my personal blog nimitsharma.wordpress.com
In this post, we discuss how to upgrade the latest minor version of JDK(Java Development Kit) of the ColdFusion server. ColdFusion can run only on top of JDK or JRE with Server VM. Oracle also started providing separate download link for JRE and Server JRE. ColdFusion only works with JDK or Server JRE and not with Client JRE [For more details refer article].
- Using ColdFusion administrator console.
- By changing the JDK or Server JRE path from the jvm.config file.
- Download the latest minor version of the supported JDK or Server JRE.
- Install the JDK or Server JRE.
- Navigate to ColdFusion Administrator > Server Settings > Java and JVM section.
- Browse the path to the JDK or Server JRE from the “Java Virtual Machine Path” textbox which you intended to use with ColdFusion.
- Click “Submit Changes”.
- Restart the ColdFusion Application service.
- Download the latest minor version of the supported JDK or Server JRE.
- Install the JDK or Server JRE.
- Open jvm.config file located at <cf_install_root>cfusionbin.
- Change the value of java.home to the JDK or Server JRE path. [For example: C:Program FilesJavajdk1.7.0_25jre or C:/Program Files/Java/jdk1.7.0_25/jre]
- Save the changes to the jvm.config file.
- Restart the ColdFusion Application service.
- It is not recommended to change the JDK version on the production servers without any prior testing in the staging environment.
- Any SSL certificates added to the previous JDK will also need to be re-added to the new JDK(cacerts) file.
Also – like Joe – needed for update to TLS 1.2. Payment gateway webservices I use stopped supporting TLS 1.0 and 1.1. Timely reminder to keep on top of updates in future. Not sure why it isn’t part of the CF Server update process. But no trouble updating manually when you have the steps laid out as above. Thanks a lot for the info.
Additional comment. The reason we needed to upgrade to JRE 1.8 is that the JRE 1.6 in our ColdFusion 10 did not support TLS 1.1 and TLS 1.2, only TLS 1.0. JRE 1.8 does and we need them to work with another program that now requires either TLS 1.1 or TLS 1.2. We have all the patches to ColdFusion 10 so far and now it works using the method I described above. If there is something safer about installing Java 1.8 manually and not using the ColdFusion Administrator, but editing the java.config path manually to change the JRE location, we would like to know that. Thanks.
I “upgraded” my ColdFusion Java by pointing it to the version used by the Windows server.
In Windows:
1. Click Windows Start button
2. Choose Programs : Java : Configure Java
3. Click on the Advanced tab
4. Near the bottom, check the checkboxes for TLS 1.1 and TLS 1.2
Both were already checked.
Find the path for the JRE folder:
Click on the Java Tab
Click the View Button
On the User Tab, you should see Path
In my case it is:
C:Program FilesJavajre1.8.0_91
Navigate to ColdFusion Administrator > Server Settings > Java and JVM section.
Browse the path to the JDK or Server JRE from the “Java Virtual Machine Path” textbox which you intended to use with ColdFusion. In my case it is C:Program FilesJavajre1.8.0_91
Click “Submit Changes”.
Restart the ColdFusion Application service.
I have been advised that I should have updated ColdFusion’s Java and not have used the one on the server. Also, I should modify the jvm.config manually and not through the ColdFusion Administrator. They referenced this blog as the source of their information. Is that correct? The way I did it is working.
Running CF11 Update 7 with JDK 8 Update 77 with no issues on a Windows Server 2008R2 system. As soon as I apply CF11 Update 8 with JDK Update 92 I receive the following error: HTTP Status 500 – coldfusion.server.ServiceFactory$ServiceNotAvailable Exception: The Runtime service is not available. The only recourse I have found is to reinstall CF11, apply CF11 Update 8 and then apply JDK 8 Update 92. Any help would be appreciated.
When we upgrade Java on our web server, we go into the Administrator and point to the new location of the JRE. We then restart the service and remove the older version of JRE.
Is there any reason why this has to be a manual process for each release of Java? It seems that ColdFusion should be set up to somehow recognize the current version and we wouldn’t have to make the change manually.
Oracle shows a JDK 32bit and 64bit version. What bit version should be used on a 64Bit OS?
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
If you are trying to call web services in CF 11 (and maybe 10 but check that yourself), CF expects the web service or any CFHTTP call to use the WebSocket Service and port 8577 in a standard setup. This is because the WebSocket Services have been optimized for web services and CFHTTP also uses WebService Sockets. I run CF 11 on my IIS server and port 8577 is blocked by a firewall. When I tried to connect, it sends back “I/O Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target” for CFHTTP and web services. It would seem like it requires adding custom certificates to the CACERT for JRE but that is not the solution for me. There is a simple fix to get this running with IIS (at least IIS) if you do not want to unblock the WebSocket Service and you don’t need that performance to run natively. All you have to do is go in to the CF Admin dashboard and change the WebSocket Service to “Use Proxy”. This will send all calls to the CF WebSocket Service or CFHTTP through IIS as a proxy. Restart the CF Application Server service and it should work just fine. If these directions are not perfect I apologize but it will lead you to get it working. http://www.adobe.com/devnet/coldfusion/articles/using-websocket.html
Would you please edit this post to include the additional step needed for CF10 & CF11 on Java 8? https://coldfusion.adobe.com/post.cfm/coldfusion-10-and-11-support-with-java-8
Thanks for sharing, Nimit. Given the fact that the JVM is often updating, and the lockdown guide does recommend people updating the JVM CF uses for security reasons, this is always a good topic to repeat for folks.
That said, there are a few more tips I’d add on top of what others have shared here (and I’ll let you decide of course, Nimit, whether you may choose to add any of these to the blog entry itself as you have some others.)
First, it seems worth mentioning to readers that if you choose to make the edit in the CF Admin, you take a significant risk in that if you point to the wrong location and CF can’t start, then you won’t be able to access the Admin to correct the mistake. I always recommend that folks edit the jvm.config instead to make this change.
Second, you may want to offer the example path (from the jvm.config steps) and repeat it in the CF admin steps, to help folks point to the correct location. (I see many people make the mistake of pointing to the location where the new JVM was installed, not its JRE subdirectory.)
Third, it’s worth clarifying for those on Windows that if they DO edit the JVM config, they must not only point to the correct location but use the path separators (like you have) , as opposed to just dropping in the Windows path which would use / by default.
These, along with Dave’s comment about SSL certs and Carl’s comment about the MSVCR dll are among the things that often confuse folks in trying to do this JVM update.
There may be another couple of things that come to mind, or that others may observe here over time.
Once you understand and watch out for these few things, changing the JVM is really pretty easy (less then 5 mins start to finish).
Yes, it applies to all the supported versions of ColdFusion. You can upgrade to any minor version of JDK, as long as the major version is supported. As of now, Java 8 is not supported but the process of upgrading the JDK will remain the same.
msvcr100.dll should only be replaced, if ColdFusion bin directory does not have the version of msvcr(NNN).dll required by the JDK being used with the ColdFusion.
You must be logged in to post a comment.