Bizarre ColdFusion MX Bug: URLDecode()

| No Comments

Here's a bug that's not documented on Macromedia's web site.

 Error Occurred While Processing Request
Error casting an object of type to an incompatible type. This usually
indicates a programming error in Java, although it could also mean
you have tried to use a foreign object in a different way than it was designed.

The error occurred in /bla/bla/file.cfm: line 204

202 : <CFSET blurb="anything">
203 : <CFSET encBlurb=URLEncodedFormat(blurb)>
204 : <CFSET decBlurb=URLDecode(encBlurb)>

That's right, URLDecode() blows up, for no good reason at all. Thanks to a Google search I figured out why. This happens if you select a column called URL and then try to use URLDecode() inside the query loop. Be aware: it doesn't matter if the URLDecode has anything to do with the URL column or not, mere proximity is enough to trigger the crash.

It doesn't work to qualify the name URL with the name of the query. I ended up making an alias for that column in my SQL so I could refer to it without using the dread word URL.

About this Entry

This page contains a single entry by Christian published on March 26, 2004 11:31 AM.

Leaving Cert Nightmares was the previous entry in this blog.

How to Interview a Programmer is the next entry in this blog.

Find recent content on the main index or look in the archive to find all content.