Subscribe: Jeffry Houser's Blog - ColdFusion
http://www.jeffryhouser.com/rss.cfm?mode=full&mode2=cat&catid=94FF3F0F-65B3-D59C-459DD7D08A0912C8
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
apache  article  articles  coldfusion developer  coldfusion  contract  data  iis  instance  server  site  sys  web server  web 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Jeffry Houser's Blog - ColdFusion

Jeffry Houser's Blog - ColdFusion



Jeffry Houser's Blog



Published: Fri, 09 Dec 2016 14:46:43 -0700

Last Build Date: Tue, 07 Jun 2016 09:00:00 -0700

 



How to fix Exceeded limit of maxWarmingSearchers=4 in ColdFusion

Tue, 07 Jun 2016 09:00:00 -0700

A new old client approached me. I hadn;t worked for them in a decade, and I suspect their code base is twice as old as that. Don;t we all love looking at old code? The site was built with ColdFusion and used ColdFusion;s underlying search engine to search files on their site. Ten years ago, the search engine in ColdFusion was Verity and we could index sites using the cfindex tag. However, over time Verity was replaced with Solr. This inadvertently caused some issues when re-indexing their site.

The Problem

Their code to index the site was like this: This was performed in a loop over all the new files in their site. Sometimes they did massive updates and the search indexing was failing. The error was something like this:
Error opening new searcher. Exceeded limit of maxWarmingSearchers=4, try again later
I set to work trying to fix it.

The Solution

If you search for this error you;ll find a lot of information about the error and Solr; but none if it is particularly useful in the context of ColdFusion. The Solr engine is getting too many indexing requests and rejecting them. It took some experimentation, but I found a solution. First, when you;re indexing the site, add the autoCommit parameter to the tag and set it to true: This tells Solr to add the files to the search collection, but not to index them yet. After all the files have been added, perform a commit action: Then all the files are indexed by the Solr engine at once. Discovering this was a bit tricky because the commit action is mentioned a few places in the documentation, but is not documented as a valid value for the action attribute of the cfindex tag. After setting this up; everything worked great!



Why Won't ColdFusion 10 show my cfgraph on IIS 7.5?

Tue, 20 Oct 2015 08:00:00 -0700

I just spent half a day trying to figure out why ColdFusion 10 would not show my cfgraphs. I solved it, but not by the 'usual' means. I have a production server locked down via the CF10 lockdown guide. It has been chugging along for a few years without any issues. I was working on some code to generate some reports on some database data. Everything was working fine on my local install of the code; but when I pushed to production my graphs were blank. The graph image was generated using something similar to this: /CFIDE/GraphData.cfm?graphCache=wc50&graphID=Images/2834639300100060.PNG Because the server is locked down; the CFIDE directory is not located in the root directory of the server. Even if it were, GraphData.cfm does not refer to an actual file, but rather a server mapping. The first thing I verified was that the graph data was actually being created. I thought that perhaps CF did not have write access to the directory it used to generate the chart files. Look here: {cfinstallDirectory}\cfusion\charting\cache If you see files being generated in that directory, then access it not the problem. It was not for me. Why was I getting broken image links when trying to load a page with dead graphs? There are a people with this problem on the web, but most of the fixes did not work for me. Manually created a CFIDE folder and a GraphData.cfm folder did not work for me. Manually creating an ide.cfm file in the CFIDE/main directory did not work for me. So, what did work? It turns out at the IIS level I had blocked a lot of URLs related to CFIDE directory. So, to fix my solution I had to remove these blocks. Follow these steps:
  1. Open up your IIS Control Panel
  2. Click on Request Filtering
  3. Click on URL. If you have setup IIS to block the CFIDE folders, you'll probably see something like this: (image)
  4. Right click on CFIDE/GraphData and click remove
My graphs immediately started showing up. Like magic!
Sign up for DotComIt's Monthly Technical Newsletter



Setting up my Dev Environment with ColdFusion 10, ColdFusion 11, and Apache Web Server

Wed, 03 Jun 2015 10:16:00 -0700

One of the first articles I wrote for the ColdFusion Developer's Journal was about setting up IIS to run on ColdFusion 5, ColdFusion MX, and BlueDragon. This was an article I co-wrote with my friend Charlie Arehart and it was published back in 2003. My intent was to write code once, and be able to test it on different application servers. This worked pretty well. Nowdays I primarily use Apache Web Server for development purposes instead of IIS. ColdFusion has increased multiple version numbers. The need from the original article still exists. I currently do work on sites that use both ColdFusion 10 and ColdFusion 11. It'd be nice to be able to run both versions of ColdFusion side by side. This article details how I set up my machine. Installing ColdFusion I already have CF10 installed on my machine, but need CF11. My first step was to download the ColdFusion 11 Developer Edition from the Adobe web site and follow the normal install instructions. You could install the EAR/WAR version of CF11 and deploy that using the CF10 instance manager. This is like running CF11 inside CF10. However, I decided to install CF11 in the server configuration mode; similar to how CF10 was previously installed. During the install, you are given the option to configure your web server. Create a copy of your Apache Web Server conf directory and have the CF11 installer configure that copy. Then you can compare the two configurations to see what has changed. I was hoping that I would be able to make use of virtual servers, attach CF10 to some virtual servers, and CF11 to others. Unfortunately that is not possible. The Problem ColdFusion 10 and 11 both use Tomcat under the hood; a change since they have been using JRUN since CFMX when I wrote my initial article. In Apache, the JkShmFile directive is used to associate Apache with Tomcat servlet container. Unfortunately, only one JkShmFile directive can be in an Apache Web Server config; making it impossible to point different virtual servers in the same Apache instance to different versions of ColdFusion. My Solution I decided that I could use the same Apache installation with completely different configurations, one pointed at CF10 and one pointed at CF11. I wouldn't be able to run them at the same time unless I gave them different web server ports, but I would be able to do testing against different versions of ColdFusion. I decided this was suitable for my current needs. This is how to run Apache from the command line and specify your custom config directory [Apache Install Directory]\bin\httpd -k start -f "[Config Directory\httpd.conf" The K parameter is used to start, restart, or stop the Apache Web Server depending of the value of the parameter. The f parameter specifies the location of the config file. The f parameter is key to launching Apache with different configs. I did some testing with this and determined it was working great. But, I wanted to set it up as a service so it would show up in the control panel on my Windows machine. This command did that: httpd -k install -n "MyServiceName" -f "[Config Directory\httpd.conf \httpd.conf" Final Thoughts Although I didn't take it this far, I could have shared a lot of configuration variables between the two servers through the use of Apache includes. That could be the topic of another article, though. Sign up for DotComIt's Monthly Technical Newsletter First Name Email Address * [...]



Manually configuring ColdFusion with IIS7

Tue, 02 Apr 2013 09:00:00 -0700

I sent this email out yesterday as part of the Flextras/DotComIt newsletter. I thought I'd repost it here. I recently had the opportunity to move some of my hosted sites to Amazon web services. The Flextras site, The Flex Show, and my personal blog, are now all hosted on EC2. It has been a few years since I've had to deal with my own production server maintenance; and I came across a weird issue with IIS7 and ColdFusion 9. I thought I'd describe the issue and explain my solution. IIS6 Compatibility is turned on Normally, when you create a new instance of an IIS web server, you'll need to associate ColdFusion with it. ColdFusion provides a tool named the Web Server Configuration Tool that can attach an instance of ColdFusion with an instance of IIS. If you happen to be using ColdFusion 9.02--or later--and IIS7; you may receive this error: The Web Server Configuration Tool will not work with IIS7 if IIS6 Management Compatibility is enabled. On this particular server, the management compatibility was enabled for the FTP plugin could be managed on the server. I did not want to uninstall the IIS management compatibility if I could avoid it. How could I tell IIS7 that it should send .cfm requests to ColdFusion for processing without using the Web Server Configuration Tool? Editing the applicationHost.config file Under the hood the mappings that tell IIS7 how to communicate with ColdFusion are in a file named applicationHost.config. You can find this file in the 'C:\Windows\System32\inetsrv\config\' directory. This file contains a lot of configuration for IIS7. If IIS7 was already installed when ColdFusion was initially installed, then you can find a section that references an existing IIS7 instance with your existing ColdFusion instance. Look for something like this: If you're using CF Standard, you can just copy and paste this section; then change the path name on the location to be the name of your new IIS7 server instance. Restart your IIS instance and that should be all you need. Otherwise, you'll have to create the above section manually; by copying and pasting from above and changing your paths to relate to your own CF Install. Although I didn't have the experience of setting this up using CF Enterprise, I expect the procedure will be similar; you'll just need to point to the jrun_iis6.dll for your specific instance of ColdFusion. [...]



How to Create a System for Caching Data

Fri, 01 Mar 2013 09:00:00 -0700

I wrote this article for the monthly Flextras newsletter, and thought I'd share it here. I was working with a client recently and we had some performance problems while accessing remote data from within our application. The user interface, built with Flex, was accessing our ColdFusion server, and ColdFusion would relay requests onto another remote system using SOAP web services. The web service data didn't need constant updates, so we decided to create a caching system for the data to improve performance. I thought the concepts behind that would make an interesting topic for this month's newsletter. What Type of Data to Store? We decided it was best to create a generic system to cache any type of data. The system should handle any type of data we wanted to throw at it. To accomplish this, I created two classes a CacheManager class and CacheData class. The CacheData class is intended to be a generic object used by the CacheManager. Here is a diagram of the class: The CacheData class is used by CacheManager to store the cached data. It has three properties: the data to store and two dates. The first date is, dateCached, which keeps track of the date and time that the data was first cached. The second element is dateLastAccessed, which keeps track of the date that the data was last accessed. The data property should be protected, or private, or something similar depending upon your language of choice. The two date properties should be publicly accessible. The class has two methods: get() and set(). The get method returns the data and should also update the last accessed date value to the current date and time. The set method will update the internal data property, as well reset the two dates. In an attempt to keep this as platform agnostic as possible; this would be pseudo code for the class: package{ class CacheData{ // this value stores the data protected var data : *; // this value stores the date that the data was initially stored public var dateCached:Date // this value stores the date that the value was last accessed public var dateLastAccessed:Date // this method can be used to retrieve the data public function get ():*{ dateLastAccessed = getCurrentDate(); return data; } // this method can be used to set the data public function set(value:*):void{ data = value; dateCached = getCurrentDate(); dateLastAccessed = getCurrentDate(); } } } This is a very simple class, not much more than a glorified value object. The CacheManager Class The CacheManager class is a bit more complicated. This is your application's window into the cached data. This is the class diagram for the CacheManager: The CacheManager has two properties; minutesCached and cachedData. The minutesCached property is an internal value will be used to determine when data should be flushed and deleted. The cachedData is also an internal value, but it is a bit more complicated. I created that as an associative array of associative arrays. In Flex, an associative Array would be a Dictionary; in ColdFusion that would be a Struct. The first key of the associative array is the type of data you want to store. I call this the cacheKey. This may be "products" or "orders" or something similar, depending on the data you want to store. The second associative array's key is the dataKey. Examples of this may be "ProductID1" or "Order13" or anything that can be used to uniquely identify the type of data, such as its database's Primary Key. The combination of the dataKey and the cacheKey is used to retrieve the data. The use of the two key structure allows a single instance of the CacheManager to be used to cache multiple types of data. There are also two methods as part of the cacheManager: store() and retrieve(). The store method accepts three arguments: the data, the cacheKey, and the dataKey. It will create a new object of CacheData object and call the CacheData.set method to store the data. It is the simpler [...]



Flash Remoting won't connect "NetConnection.Call.Failed"

Wed, 04 Apr 2012 17:54:00 -0700

I've been doing some with for the Flextras promotions around 360|Flex. As part of the promotions I am creating a customized version of my Game; strictly for Flextras. It is going to allow people to login and will keep score on our server instead of internally to the app. Since this is a Flash app; I'm using Flash Remoting to connect to our ColdFusion server. Everything worked fine on my local machine. Everything worked fine on my development server (AKA Staging). However, my production machine was giving errors that looked like this:
faultCode: "Client.Error.MessageSend"
faultDetail: "Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url:
faultString: "Send failed"
I've tried a lot of different things including not using http instead of https. I knew that Flash Remoting was working on the production server because I had other Flex apps working without problems. So, what was the problem? I've been working on this on and off for about five days; so tried a lot of different things. In the end I discovered two things:
  1. Make sure your Flash Remoting URL has a '/' at the end of it. 'https://www.flextras.com/flex2gateway' was not working. It appeared to add a JSessionID on it; which was causing the server to throw a 404 error; causing the whole call to fail. However, if I changed this to 'https://www.flextras.com/flex2gateway/' that problem went away.
  2. Turn off the Flash Builder Network Monitor. The Flash Builder Network monitor was intercepting the call and causing it to fail. The calls appeared to work fine from a web browser with the Flash Builder Network Monitor enabled, but not from the mobile app.
I think--but am not completely sure--part of my issues related to using HTTPS on the server instead of HTTP. That could be the reason I had issues on the production server, but not my local or staging box.



Migrating Instances from ColdFusion 8 to ColdFusion 9

Wed, 14 Mar 2012 14:54:00 -0700

Unfortunately, I came back from lunch yesterday to find my laptop was dead. I couldn't get it to load. It was a refurb unit that had served me well enough for three years. I was hoping to get another 6 months out of it; but it is what it is. This put me in the unfortunate position of needing to set up a new development machine **NOW**. Thankfully, I have a new machine here just waiting to be set up for development. It gives me a slight delay before I have to replace the laptop. The old machine had CF8 installed in the multi-server mode. I had used the CF8 instance manager to deploy multiple CF8 and CF9 instances of ColdFusion for development purposes. Could I take those instances created in CF8 and somehow use them in CF9 without having to recreate them from scratch? Yes, the answer is yes. I wrote a bit my experiences moving these same CF8 instances from one machine to another in the past. Here is how I did it:
  1. First I installed Apache. It is my preferred web server. Then I stopped Apache, backed up the config files, and replaced the 'clean' config files with my old config files. This will give me all the info that attaches Apache to the CF Instances and what not.
  2. Then I installed ColdFusion 9; the multi-server edition. During hte install I attached it to my 'clean' config of Apache. I had no idea, when I was doing it, if that was a good idea or not but it worked and the 'old' Apache config seemed to connect up to ColdFusion without any issues. So now I have a working CF Administrator with an instance manager.
  3. Then I used winmerge to compared my old CF8 install directory and the new CF9 install directory. I copied over all my server instances--except for the cfusion one that was created by default. The server instances are located in the servers directory of the install.
  4. Finally, I scoured over all the differences in the winmerge report to figure out how CF was deciding what was an instance and what wasn't. There are two files:
    • lib\wsconfig\wsconfig.properties
    • lib\servers.xml
    I believe these two files contain all the data for how the CF Instance manager finds the instances. I used winmerge to move all my "old" instances into the new files. I restarted the Macromedia JRun and Macromedia ColdFusion instances, reloaded the admin and all my old 'CF8' instances showed up. Just like magic.
Now all I have to do is create the Windows services for these instances--as I talk about in my other post. Since CF10 is not going to use JRun, I'm not sure I'll be so lucky during the next upgrade.



CF101 Archive: October 2007 Every Beginner must Grow Up

Sun, 05 Feb 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This article was my final article. I'm not sure if it was ever published formally, though.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79E43F10-5056-1B43-AC9CC1EA9B1A8555/2007 09 Every Beginner Must Grow Up.pdf




CF101 Archive: September 2007 Object Oriented Pizza

Sat, 04 Feb 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This is without a doubt the favorite article I've ever written. I wrote it afraid I was going to become the active target for every high level CF Developer. That didn't happen thankfully. I remember the response being relatively positive.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79D971DD-5056-1B43-ACD74CBD72F98CCE/2007 09 ObjectOrientedPizza.pdf




CF101 Archive: February 2007 Data Table Gateways

Fri, 03 Feb 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This article follows the design pattern scheme of the previous one and focuses on Data Table Gateways. An interesting tibbit is that I would rip my articles out of the PDFs and write up these entries while watching the TV Show supernatural. I bet I got out of the habit when the season ended which is why these articles remained unposted for so long.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79C136D4-5056-1B43-ACF52607EE08672D/2007 02 Data Table Gateways.pdf




CF101 Archive: January 2007 Data Access Objects

Thu, 02 Feb 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. In this article, I delved into some of the design patterns that a lot of ColdFusion developer's were starting to use, in this case data access objects. I don't have anything against design patterns but I often feel some of the proponents of design patterns pitch them as the answer to all your problems. In reality, they are just an approach to solve something and there is often a tradeoff for using one to solve a problem.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79A72C4B-5056-1B43-ACBD45B8507FD806/2007 01 Data Access Objects .pdf




CF101 Archive: October 2006 Five Cool Things with ColdFusion

Wed, 01 Feb 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This is one of my favorite articles; because I cover a lot of the cool things I had been doing in my own development, such as hooking CF up to a credit card scanner and a bar code scanner and generating bar codes. Around this time, CFDJ's publication schedule started to get more and more spotty. I didn't know for sure at the time, but it was probably starting to wind down. The publication world was starting to change, and magazines were not going to be the future.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/796B749E-5056-1B43-ACCAB392A1B1EAE9/2006 10 Five Cool Things With ColdFusion .pdf




CF101 Archive: September 2006 A first look at FusionDebug

Tue, 31 Jan 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This article is a look at the third party ColdFusion command line debugger, FusionDebug. Debuggers like this are a fantastic tool for programmers. I loved it when working with technologies that pre-dated my work with CF and I loved it when working with Flex. For some reason, debuggers never took a final resting place in my CF Toolset.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79534319-5056-1B43-ACB2BF34ABFE849E/2006 09 A First Look at FusionDebug.pdf




CF101 Archive: July 2006 Creating an RSS Aggregator Part 2

Mon, 30 Jan 2012 18:00:00 -0700

CF101 Archive: Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This is the second half of my article on creating an RSS Aggregator project. Later versions of ColdFusion made this project much simpler, I think by adding a CFFEED tag or something similar.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/793ACF8A-5056-1B43-AC9D47229019B76E/2006 07 Writing an RSS Aggregator P2.pdf




CF101 Archive: June 2006 Getting Started with Flex 2

Sun, 29 Jan 2012 18:00:00 -0700

Disclaimer: In 2007, sys-con closed down the ColdFusion Developer's Journal, and I wanted to post all the articles I had written to this site. I started, but got distracted on other things. I'm performing a purge of my digital archives and found the articles. At this point they are posted here more for my own archival purposes than because anyone is longing to read them. This article is being reposted in accordance to my contract with sys-con. I had them change the default contract so that I could post articles on my personal site. This article probably represents my first foray into Flex development, something I've done a lot of over the years. It's amazing to see how far Flex has come since being introduced.


Media Files:
http://www.jeffryhouser.com/download.cfm/id/79275528-5056-1B43-AC8DED4BECDE71FB/2006 06 Getting Started with Flex 2.pdf