If you’re running a 64 bit ColdFusion installation and want to use cfdocument to convert Word, Excel, or PowerPoint files to PDF you may encounter an issue with an incompatibility between the 64 bit dll for ColdFusion and the 32 bit dll for Open Office. Java can’t load and run them both to work together. The good news is that there is a workaround for this issue. You’re going to need to: Download the latest version of Open Office from openoffice.org to your server and install it (you can use the default locations during the installation). Download the Non Sucking Service Manager (NSSM) from nssm.cc and simply save it into a convenient folder – no installation needed. You will then create […]
I was getting an oddly unhelpful error message when working on some ColdFusion development. Code that I knew ran okay on our development server was having an issue when setting it up to run on my local server. The error simply read “Truncated class file”. It turned out that the settings in the ColdFusion administrator had the component files setup to cache – which you don’t want on a development server where they are frequently changing. So, under Server Settings > Caching I unchecked the Save class files checkbox and used the buttons to clear the cache and everything was working again. Why was this breaking, probably a result of switching between branches in git and / or a file […]
For a long time, we have considered the use of XMLSearch slow compared to working through an xml object as a standard ColdFusion structure. However, recently we have discovered that XMLSearch is actually comparable in speed to the structured approach and it was just our way of using it that was causing the slowdowns. It turns out that that we were using the “//” XPath operator at the beginning of our calls to XMLSearch regardless of where the XMLDoc object that we were supplying was pointing to. This would cause the search function to go to the root of the document and search the whole tree. Removing the “//” operator from the XPath portion of the call forces ColdFusion […]
Dumping out the SQL from a query object, even more so if it’s been passed around through some functions, can be a pain. Usually you can wrap the query in a CFDUMP and call it a day, however for very large queries or if you want it more concise use this <queryname>.getMetaData().getExtendedMetaData().sql
I needed a quick list of countries and time zones and I wanted to add it to my database so I could manipulate it easily for a new application we’re developing (details on that coming soon). I looked around but didn’t find what I wanted so after a bit of searching I took a few static select lists and copied them into Excel. I then imported the lists into my database using ColdFusion. In case they help anyone I’ve made the lists available here as CSV files. Time Zones (.csv, 4 KB) Countries (.csv, 4 KB)
I spent some time recently trying to track down how to create a database and datasource in ColdFusion without going into the ColdFusion Adminstrator interface and doing in manually. I found plenty of articles and documentation on how this was done in ColdFusion 5 and notes that it had changed but nothing on how. Now that I’ve got it working I’d like to share how I did it in case anyone else is looking for help with this.