Ugh.. not again.. More technology on death's door

Well, it happened again, someone went and published a list of the top 10 dying IT skills ( I bet you can't guess what was on the list. Yep, you guessed it, NetWare. However, to be fair, NetWare has been on every dying list for years. Beyond NetWare, the other item to make the list was our beloved ColdFusion. However, this does not surprise me. ColdFusion gets added to every dying list for the past few years. However, it is still going strong and getting stronger.

Now, this list got me to thinking. Who generated this list and what qualified them to make it. Also, what qualifications did they use to generate the list. Based on the article, the writer apparently used a job search count from a site I had never heard of (

Ok, so this seems like a lame reason to say it is dying. Based on the article alone, I don't think the writer did very much research.

Then the list went on to name HTML as dying skill. Apparently the writer did not know that HTML is the language that browsers use to render a web site. Granted, with today's editors it is easier to write but it is still the corner stone of web browsing.


Thanks for your opinion but...

Normally I use my blog as a vehicle to share what I have learned. I typically put things in my blog that are intended to help other developers. Today is a little different; this blog post is mostly for those that don't use ColdFusion. I am not sure that people who don't use ColdFusion will read my blog but hey, this is what I got.

I have had a twitter account ( for a long time. I never really used it until recently. Thanks to applications like TweetDeck it makes it much easier to use. I setup a search for "ColdFusion" to see what is going on out there. During the past couple weeks I have seen some things that seriously tick me off. I am generally a pretty calm person. It takes a lot to push me over the edge. I, as a general rule, try not to comment on the bantering of others. I find it very time consuming and tiresome.


Block Firebug on your site

So, you want to stop people from using Firebug when visiting your site? Well, it is just about as easy as you think. All you have to do is basically just see if the firebug console is active. If so display a warning and relocate. The one thing to remember is that you want to prevent this from running when doing cfc calls. This is also true for any other call that does a non standard return.

view plain print about
1<cfsavecontent variable="firebugTxt">
3    if( window.console && window.console.firebug ){
4        alert("Sorry! This system does not support Firebug.\nClick OK to log out.");
5        window.location='/login_out';
6    }
9<cfhtmlhead text="#firebugTxt#">

till next time...


Unicode data and queries

I have been working on a part of an application that stores translation data. How it works is very simple. A user would go in and translate text from one language to another and save the translation. Sounds very simple right? Yea, that is what I thought too. That was actually until I tried to save the data.

What was happening was this. The data being saved in the database was showing up as "?????? ???????" when querying the data through SQL Management Studio. I then double checked to see if I was going crazy. I ran a select query via ColdFusion and the data came back in the same way. I found this quite strange considering the cfstoredproc debug output of the insert looked good.

After doing some digging I made some alterations. The alterations were based on the fact that I was using the wrong data type. First I changed the parameter data type in the stored procedure from varchar to nvarchar. I also changed the table data type to nvarchar. This should now allow me to insert and store the data correctly.

I then reran the inserts and I was still at the same place. The data was still getting inserted wrong but the debugging of the insert looked accurate.

I then did some more digging and found something else I needed to change. This next change was to alter the datasource in ColdFusion to enable Unicode data. Once this was done I reran my tests.

BINGO! JACKPOT! YOU WIN! The data was now saved and retrieved as expected. Finally I was done with this part of the app. It was then, in the beginning moments of when I was reveling in my victory, that my world came crashing down around me.


CFIMAGE generates java error

While doing some image work this morning with watermarking I came across this strange error:

Error Occurred While Processing Request
General CMM error517

Here is part of the stack trace:

view plain print about
1java.awt.color.CMMException: General CMM error517
2    at sun.awt.color.CMM.checkStatus(
3    at sun.awt.color.ICC_Transform.<init>(
4    at java.awt.color.ICC_ColorSpace.fromRGB(
5    at java.awt.image.ComponentColorModel.getDataElements(

After doing a quick search (the internet is cool huh?), I was able to find this: This issue that I ran into is apparently a recorded bug in JAVA. The bug was reported 2 years ago and it apparently has not been corrected.

The issue is with the jpg file I was trying to use. It apparently has a corrupt color profile and java can't handle it. I did check the properties of the file and noticed that the color representation property was set to uncalibrated. I was able to open the file in Fireworks and saved it as a new file and the new file works fine.

I have not found a way around it yet. The error happened when I tried to paste a one image onto another using ImagePaste.

Till next time...


CFSAVECONTENT generates JAVA heap space error

I found this little gem while working on some code for my upcoming presentation to the CF online user group. I was working to crate a text file that contained a million lines of text. The code ran perfectly while doing test runs generating only 10 lines. When I ran it to create the million lines it failed out.

Here is the code I wrote:

view plain print about
3<CFLOOP INDEX="i" FROM="1" TO="1000000"><CFOUTPUT>#i#</CFOUTPUT>: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum. Cras id urna. Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius lorem, eu posuere nunc justo tempus leo. Donec mattis, purus nec placerat bibendum, dui pede condimentum odio, ac blandit ante orci ut diam.
8<CFFILE ACTION="WRITE" FILE="#expandPath('.')#\textfile.txt" OUTPUT="#theRes#" NAMECONFLICT="OVERWRITE">

The error was not even a CF error message but a JRun servlet error.

view plain print about
2java.lang.OutOfMemoryError: Java heap space
5javax.servlet.ServletException: ROOT CAUSE:
6java.lang.OutOfMemoryError: Java heap space

It appears that there may be a memory max to CFSAVECONTENT. So, I got curious and starting playing with the code. After a bunch of trial and error I was able to figure out the max loop count I could run without error was 294712. This generated a 92mb text file. So, without figuring it out to the byte I would assume that the max is in that area.

Till next time...


CFDocument pdf generation broke after CF8 upgrade

I just did an upgrade to a system a couple days ago from CF7 to CF8. I received a report from users that a section of the system that generates pdf reports was breaking. I found this strange since this section of the system is used daily and we have not touched the code in over a year. I figured at this point that the upgrade had something to do with it. After some investigating I was able to figure out that it was in fact a CF8 specific issue. The code for the pdf generation worked in CF7 but breaks in CF8.


Altering CSS to style ColdFusion 8 UI - Good Idea?

The new UI features of ColdFusion 8 are pretty amazing. They have made it possible for anyone to easily take their web applications to the next level. These new features allow you to do away with old style design. For example CFWINDOW instead of a pop-up window or using CFLAYOUT tabs to load different data onto the same screen without page refreshing.

The downside of all this is changing how the UI elements look. You can apply CSS styles to elements to change their look but not everything is exposed. There are a ton more styling that could be done once you look under the hood. Using Firefox with the FireBug plugin you can see all the different styles and classes used in the UI elements. With this information you can start to get creative styling the UI.

The question comes in as to whether it is a good idea. While you can get in and alter just about everything in the UI; all this extra, under the hood, stuff is undocumented. There are many inherent dangers in playing with undocumented items. Things are usually undocumented for a reason. There is no guarantee that they will remain the same from version to version. It is possible that the class used for an item may not be the same class in the next version.

I have posted a bunch of different ways to alter the CSS for ColdFusion 8 UI items. I personally don't think it is a bad idea. But I do think that the developer needs to be careful of what they modify. I have gone as far as to keep a list of modified CSS styles and classes. I also try and centralize the changes in a single CSS doc. This way when a new version comes out making sure my alterations still work will be easier.

Hopefully in the future more styling options will be exposed. But until then, if you choose to alter styles in this fashion just be careful and diligent in your coding. Doing so will save you many headaches during upgrade time.


CFDJ out SLDJ in?

On the off chance you just got out of hibernation lets recap. Sys-Con has decided to drop CFDJ and replace it with SLDJ (SilverLight Developers Journal). Now, just in case you have seriously been out of touch. SilverLight is supposed to be the Flash killer from Microsoft (Draw your on conclusions here).

Their reasoning for dropping ... err ... relaunching CFDJ as SLDJ is just dumb and makes no sense. They claim that there is a move away from ColdFusion for AJAX, FLEX, and SilverLight. Well apparently they have no idea what these all are. ColdFusion is a back-end solution where as the others are user interface (RIA) items. Also, how can you relaunch something when the new content is completely different subject matter than the old?

I have not been a fan of CFDJ for some time now. The content has been nothing but lackluster for some time. They were always behind. They even tried to cover it up by not putting the month on the magazine cover anymore. Beyond that the article content was behind as well. The latest issue has the lead story on test driving CF8 beta. But, when I received it CF8 was out of beta and in full release.

For me personally, I am glad to see it go. It was doing ColdFusion a dis-service as a developers journal. I would rather read more current things from blogs and online articles that are covering current issues.

The huge bright side in all this is that I don't have to go to sys-con's pos website anymore. That site should be on the list of the top 5 worst web sites ever.


CFSCRIPT incorrect error

Well, it took about 20 minutes of digging through code to find the code error. However, if the error message would have been accurate it would have taken about 5 seconds. In a cfc I was working on there are 5 functions in it. Each function contains a cfscript block. Some are a couple hundred lines each. CF was giving me this error:

view plain print about
1The start tag must have a matching end tag. An explicit end tag can be provided by adding </CFSCRIPT>. If the body of the tag is empty, you can use the shortcut <CFSCRIPT>.../>.

However, this error is inaccurate. The actual issue was that there was a missing ";" at the end of a line inside the cfscript. I checked the same code against CF7 and CF8 and the error message was the same.

So, the moral of the story is... I have no idea. But, keep an eye on your code and remember that the error reporting in CF can, at times, be wrong.


Previous Entries / More Entries