Skip to: Site menu | Main content

Email Facebook LinkedIn Twitter Google

Blog...

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:

local_policy.jar
US_export_policy.jar

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.

Windows 10 Update 1703 BSOD

After the most recent Windows 10 update (1703); my very solid and stable workstation started getting blue screens.

Being a windows user for more than twenty years I've come to expected the occasional BSOD. Things fail. It just happens.

So while the first BSOD was troubling; I was not immediately alarmed.

After the third BSOD I knew something was wrong.

Running WhoCrashed revealed the root cause to be:

netwtw04.sys

A bit of searching revealed that to be WiFi related.

I fixed my problem by downloading the latest reference drivers from my WiFi networking card manufacturer.

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:

https://tracker.adobe.com/#/view/CF-3926479

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:

{CFUSION}\cfusion\wwwroot\WEB-INF\web.xml

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.

SQL Server Reporting Services (SSRS) Emails Invalid Report Links

Typically it's unnecessary to adjust the default SSRS email report settings, but sometimes it's unavoidable. For instance, in our case we needed to expose the SSRS web portal on a specific URL.

We're using the latest version of SSRS: SQL Server SSRS 2016

I found several references and guides on how to change this via the SSRS configuration file:

{MSSQL DIR}\MSRS13.MSSQLSERVER\Reporting Services\ReportServer

[More]

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.

[More]

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

[More]

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

[More]

Visual Studio Web Reference without Web Service (or direct from WSDL file)

This may be documented elsewhere, but I had a hard time finding it so I'm going to write a quick blog entry about it for my reference.

I needed to build a Visual Studio 2013 project that had a connection to a Web Service. However the the code would only have access to the web service once deployed. In essence I needed to tell Visual Studio how to access the web service without actually having access to the web service.

The solution was actually quite simple, though not exactly intuitive.

[More]

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.

[More]

More Entries