I have been working with Brian Ghidinelli for over a year on putting together, testing, and implementing the CFPayment ColdFusion Payment Processing API. Brian and I have both been using it in production for several months with great success. You can see the details of his announcement, then go to RIA Forge to download and try it yourself!
I received a response back from Adobe early this morning about the new case sensitivity issue that I have been dealing with that appeared in a hot fix applied to a ColdFusion 8.0.1 instance.
The response pointed me to a newly created Adobe Tech Note: http://www.adobe.com/go/kb403862. The tech note, entitled "ColdFusion 8 Case Sensitivity Behavior Change on UNIX", states that the Adobe made a core behavior change in linux/unix-based systems in regards to case sensitivity.
What is doesn't really explain is what the change means for developers. For instance, the change creates a new requirement to match custom tag calls and CFC CreateObject calls to the case of the filename. Also, it doesn't explain that this may in fact break existing code (perhaps even purchased, encrypted code) that may have even previously passed all kinds of QA testing.
For example, if you have a custom tag named "mycustomtag.cfm", you can no longer can you do this:
You must do this instead:
In addition, if you have a cfc named "mybean.cfc", you can no longer invoke it like this:
but rather like this:
While that may not seem like a huge issue, we've been doing mixed case for years and years without issue. Finding all custom tag occurrences throughout our code will be difficult and time consuming.
One thing I haven't tested is if this affect custom tags imported via the cfimport tag. If cfimport is affected also, it could be nigh-unto-impossible to find all the occurrences because there would be nothing easy to search for.
Adobe, please rethink this decision and provide a way to fix the issue with resolving ColdFusion Component (CFC) paths that started this process without breaking backward compatibility of our code.
Please know that I am not trying to rant on Adobe or ColdFusion too much, but do desire to bring this issue to the attention of the community in case others are having the same issue. I will post some "happier" blog entries soon to offset these somewhat negative ones that have cropped up this week.
In my previous post, I discovered an issue with ColdFusion 8.0.1 + Cumulative HotFix 1 that was causing me a major headache. While the custom tag issue wasn't too bad, the CFC invocation case sensitivity was huge. It stopped me in my tracks while trying to develop a ColdSpring + Transfer app that relies on scores of CFCs to be invoked, most using mixed case for the invocation. While grasping at straws trying to fix this issue, I began back-revving the updates I had applied, starting with the cumulative hot fix 1. Lo and behold, after remove the jar file and restarting ColdFusion, the problem disappeared!!! Looking through the "fixes" that are covered by the cumulative hot fix 1, my guess is that it would be related to the Patch for Apache Connector ArithmeticException Divide By Zero. The details say that "... error occurs as ColdFusion tries to resolve ColdFusion Component (CFC) paths." and references "coldfusion.util.CaseInsensitiveMap". My guess is that Adobe messed something up with the fix that broke normal functionality. I'll have to follow up with someone to be certain and to hopefully get this fixed soon. In the meantime, I hope I don't need anything include in the hot fix list!
Continuing with my 8.0.1 gotchas, this is the biggest and worst offender of the bunch. I'm running ColdFusion on linux (Red Hat Enterprise Linux 4 Updater 5), installed in server mode running with Apache 2.
After the 8.0.1 upgrade, all calls to custom tags that uses a different case in the CF tag (cf_MyCustomTag) than the filename (mycustomtag.cfm) stopped working. The updater appears to require exact case matching. Note this also affects CreateObject() on cfcs (the actual CFC never had to match case).
This is a huge change from previous versions and something that was not mentioned in any of the documentation for the updater.
I'm doing more investigation to find out if there is any resolution other than changing all my references to use exact case matching.
Note: The ColdFusion docs do mention that custom tag filenames must be lowercase on linux, but (at least in previous versions) the ColdFusion tag that calls that custom tag need not match.
In ColdFusion 8.0, the following code worked:
Apparently some others (scroll down to the section discussing "...image format is not supported on this operating system...") had this problem before, but this code has successfully run for several months until the update. The cfm file returns a content type of image/jpeg, so perhaps that's why it was working. In order to get it working now, I had to to change the URL to this:
I also had to update the cfm file so the mode is retrieved from the cgi.path_info. The passed filename is basically ignored, but key to ColdFusion 8.0.1 accepting the URL.
I recently upgraded our CF 8 server to CF 8.0.1 plus the cumulative hotfix 1. I'm blogging threw a couple issues we ran into that I thought may help others.
The CFExecute tag changed, but according to the docs, all that was changed was to add two new attributes: errorFile and errorVariable. Unfortunately this change caused a side effect to some code I was use. We had code like this:
This would capture the standard output of the executable's results in the exResult variable. This has worked for years across multiple versions of ColdFusion. CF 8.0.1 broke it. After the update, the exResult variable was blank. No errors, just no data. After much head scratching, the fix was to get rid of the cfsavecontent tag and use the variable attribute:
Apparently the variable attribute has been around since CF MX 6.1, but somehow our code never was updated to use it. Well, it is apparently required now.
After muddling through the first 30 minutes at the start of an introductory keynote, Ben Forta and Adam Lehman from Adobe really took off during their keynote talking about the future of ColdFusion. This is early sneak peaks, so this may or may not be in the final product and will likely change in syntax and functionality along the way. Here are some highlights that stuck out in my mind:
- ColdFusion is doing very well; the best since Adobe has taken over the product
- CF Open Process Initiative - Public bug database and enhancement requests' Customer Advisory Boards: community leaders, focused committess on CFML Language, RIA, frameworks and more; early access to alpha/beta releases
- Centaur (ColdFusion 9) - advancing CFML, improved integration story, improving the developer experience (more this last point at MAX); integration: especially flex, air, etc.
- Growing the ColdFusion base (problem of the lack of ColdFusion developers) - [new announcement] ColdFusion will be freely available for students and faculty for academic use, similar to the model to Flex Builder for Education; plus training materials, etc.; product is full unrestricted version; coming soon;
- Protecting the integrity of CFML (problem of language framentation and inconsistency over the years) - [new announcement] Newly formed "CFML Lnagugage Advisory Committee" to help define the rules and guidelies around the use and evolution of CFML; include Adobe plus outside community leaders (Sean Corfield, Ben Forta [Adobe], Sanjeev Kumar [Adobe], Gert Franz [Railo], Ray Camden, and Rob Brooks-Bilson)
They also gave a plug for the upcoming ColdFusion 9. It looks like it will be released in 2009.
- Create UDFs and CFC methods using <CFSCRIPT>
- argument definition and validation, roles, access, return types
- create CFCs using cfscript
- Explicit LOCAL scope keeps local variables local
- <cfset LOCAL.var=1>
- using "var" still works
- var statement can be used anywhere within function
- default settings within a CFC (so all variables will be scoped within that setting)
- New tag: CFFINALLY - always runs, located right after a <CFCATCH>
- New tag: CFCONTINUE - brought in from cfscript; sends back to top of loop without breaking out of loop
- new and import keywords: creating components
- implicit constructors: <cfcomponent init="functionName">, or method named init(), or a method with same name as component
- implicit getters and setters using <cfproperty> attributes; hand-written methods overwrite implict methods
- new server.cfc file with OnServerStart and OnServerEnd; one per instance; all applications inherit from it
- Centaur will make AIR integration easy
- New Flex-CF integration - import com.adobe.coldfusion.*
<cf:Query name="create" sql="INSERT INTO artists..." />
<cf:Query name="read" sql="SELECT * FROM artists where artistid="@artistid" />
- When online, it will update the CF datasource directly; when offline, it will update a local SQL Lite copy, then sync when the app goes online again--cool stuff!
- Databases will have an integrated ORM using 100% hibernate using CFCs
<cfcomponent orm="true" datasource="cfartgallery"></cfcomponent>
artist = hibernate.getById(33, "com.adobe.demo.artist");
artist = hibernate.save(artist);
- That's all you need! CF will draw the table name from the name of the CFC.
- it will generate hibernate XML behind the scenes
- it will also add table columms on the fly based on new cfproperty tags and attributes
- they will somehow integrate cfquery with this ORM technology to be able to go back-and-forth between the two (if I understood them correctly)
All-in-all some very cool stuff. Thanks for the demo guys!
I realized today that I have blogged very little recently. And once again I purpose to blog during the CFUnited conference. I usually blog a bunch during the conference then taper off again as I get back into my daily routine. Someday I'll get blogging into that routine..
For now, I'll be enjoying the palatial Washington Convention Center. Flights went well, but then it took several hours to actually get downtown from BWI. Reagan airport is MUCH more convenient. Oh well! Off to check in to the hotel and find some dinner before MiniMax 8.
I published a new project to RIA Forge today named "RegExer." Now I know there are many ways to test regular expressions, including some on the web, stand-alone apps, and even eclipse plug-ins, but I wanted one that I could (1) run locally on my development machine and (2) would be tested directly against ColdFusion to be assured of the correct matching algorithm.
The online application that came closest to what I wanted was Jon Hartmann's CFREGEX Tester, but there didn't appear to be anywhere for me to download it nor any good way to contact Jon about sharing the code. So based off some of his UI, I forged my own.
In addition, I added a few features to Jon's that I wanted/needed: (1) the ability to see the matching string, (2) the ability to run the test via ajax, and (3) the ability to keep track of the expressions I was testing.
I have tested it with ColdFusion 8 since that is my development environment, but it should work fine in ColdFusion 7 by changing one line of code from using the CF8 built-in function SerializeJSON() to invoking the json component (included in the zip). If someone has ColdFusion 7 and wants to give it a whirl, it would be great to know if that's the only change that needs to happen.
Any other features others have wished for?
I'm working on moving an application over from my development machine (WinXp Pro) to my testing/production servers (RedHat Linux). The application uses an Apache Derby Embedded datasource in ColdFusion 8. Setting up the datasource on my Windows machine worked like a charm, but when I went to do the same thing on the Linux machines, the ColdFusion administrator interface shows "Data & Services > Datasources > Other" when I select "Apache Derby Embedded" as the datasource type on the main Datasource screen for adding datasources. On my Windows machine, it goes to the "Data & Services > Datasources > Apache Derby Embedded" screen. In order to work around this bug, I used the following data on the "Other" datasource entry screen to hook up to the Derby database:
Driver Class: org.apache.derby.jdbc.EmbeddedDriver
Driver Name: Apache Derby Embedded
The create=true is the same as checking the box for Create Database on the normal datasource entry screen in Windows. Seems to work like a charm!