Skip to: Site menu | Main content

Email Facebook LinkedIn Twitter Google


ColdFusion AES 256 JCE Unlimited Policy Files

While using ColdFusion's Encrypt() function I received this error:

The key specified is not a valid key for this encryption: Illegal key size or default parameters. If encryption key size is greater than 128 bits make sure to insall JCE Unlimited Strength Policy Files. Use the generateSecretKey method to generate a valid key for this operation.

The solution is pretty straight forward, but not well documented.

First download the the APPROPRIATE version of the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. You can review your Java version in inside the ColdFusion Administrator > Java and JVM tab. You'll also need to note the path to the JVM used by ColdFusion from the same tab.

The Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files will come as two JAR files:


Use these files to replace the existing files in:

{Coldfusion JVM Path}\lib\security\

NOTE: You should create backups of the existing files before replacing them.

ColdFusion Sending Page Cache Headers By Default

ColdFusion 11+ will by default send caching headers on every request (i.e cache-control, Pragama: no-cache, etc.)

The solution is buried in this Adobe Tracker thread:

I'm documenting it here because I continually run into the problem when installing new instances of ColdFusion and I continually find myself searching for hours for the solution.

Simply comment out the entire MobileDeviceDomInspectionFilter section in the web.xml file:


Branch target offset too large for short null in ColdFusion

When working with complex logic functions in ColdFusion (i.e. lots of code) I've encountered this error numerous times

Branch target offset too large for short null

This error essentially means your method length exceeds what the JVM allows.

To correct the error break the logic up into multiple smaller functions.

RDS no longer working in ColdFusion 2016 on IIS

While setting up my first ColdFusion 2016 server I came across an interesting problem with RDS.

My problem was that I could not get RDS to connect via ColdFusion Builder 3.

The error when I would attempt a test connection:

Unable to contact RDS Server "[Remote Server]". This can be caused by incorrect configuration on either the client or the server.

Please verify your connection details below or check your servers documentation on how to enable RDS for your server.

The HTTP request to talk to your server returned with the following message:
Error executing RDS command. Status Code: 404, Reason : Not Found

First I made sure RDS was enabled via the ColdFusion Administrator.


CFSPREADSHEET action="write" java.lang.NullPointerException error

Came across some odd CFSPREADSHEET behavior in ColdFusion.

I was attempting to quickly export a query object to an Excel spreadsheet:

<cfset tmpXLSFile = "#getTempDirectory()#data_export.csv">
<cfspreadsheet action="write" overwrite="true" filename="#tmpXLSFile#" query="exportData">

ColdFusion kept throwing this strange error:

An exception occurred while using action=write. java.lang.NullPointerException


Odd URL variable behavior in ColdFusion

Ran into another issue (caused by me) with the IIS URL Rewrite module and ColdFusion.

A couple of our client applications utilize a REST API written in ColdFusion. It does not use the newly released built-in API in Coldfusion 2016. The REST url's are made possible by using the IIS URL Rewrite module. The module takes the rest API and then passes it to the ColdFusion API handler


ColdFusion 11 / RESTful API / IIS URL Rewrite Issues

I recently went through a ColdFusion upgrade. We were going from version 8 to version 11. Since we had previously tested the application with ColdFusion 10 we fully expected some hiccups.

Most of the trouble encountered was easy to find and fix, however one item really gave me some trouble.

Our application has a custom API that relies on RESTful URLs. We use the IIS URL Rewrite module to map API RESTful URLs to a ColdFusion API controller page. In previous versions of ColdFusion we'd used the IIS URL Rewrite module without any issues.

When we upgraded to ColdFusion 11 our API no longer functioned and provided very little error detail.


ColdFusion Will Not Start After Changing Service Account

While creating a new ColdFusion server I attempted to change the Windows Service account to a domain service account. I've done this on almost every ColdFusion server I've ever setup because they typically need access to network resources and it makes it easy to manage the application rights.

This time however I was unable to do so. I received a generic error from the service manager:

The Coldfusion Service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs

The ColdFusion server logs were not very helpful. They showed the server starting and stopping (just as the service manager error stated).


Coldfusion RDS 404 error on OSX

When running Coldfusion on OSX with RDS enabled you may receive a 404 error when trying to connect your IDE (CF Builder, Homesite, etc.)

After reviewing permissions and configuration I found that the issue was Apache checking for the existence of the page prior to attempting to run it. The RDS IDE functions/page does not exist because it simply a URL pattern defined in the web.xml file.

An easy fix was to setup a dummy folder/file:


The IDE.CFM page can be blank, Apache just needs to verify the file exists prior to handing it to the Java server for processing.

IIS 7/8 and Coldfusion 10

While deploying my first Coldfusion 10 server on Windows 2008 R2 SP1, I ran into this strange behavior.

My IIS Default website had no issues processing CFM files after the install. However other IIS sites would not process any CFM pages. The message I received from IIS was the standard 404.

Accessing the URL on the server I found that the requested URL was: http://{my site}/jakarta/isapi_redirect.dll

Just to see if it would work I mapped a virtual directory named "jakarta" to

CFUSION INSTALL\config\wsconfig\{instance id}

Magically my site began processing CFM files.

Sami Hoda's entry pointed me in the right direction of running the WSConfig utility on each instance.

The WSconfig more completely configures the site, but still seems like a pain to have to do this on every new site.

More Entries