TemplateNotFoundException error – ColdFusion 9

I came across a strange error while setting up a virtual ColdFusion 9 sever (Windows 2008 with IIS 7.5). Whilst loading up a test site I got the following ColdFusion error:

Error Occurred While Processing Request
File not found: /index.cfm

On the face of it, it looks like an obvious fix. Surely there is no file by the name of index.cfm in the root of the folder.  Wrong!  The file does exist.  However, if I was to replace it with a simple index.htm file that wold work without any problems.

Digging a little deeper I took at look at the application.log and exception.log in ColdFusion administrator to see if there were any further clues.


"Error","jrpp-8","12/26/15","17:43:11",,"File not found: /index.cfm The specific sequence of files included or processed is: C:\Websites\SampleSite\wwwroot\index.cfm'' " 


"Error","jrpp-8","12/26/15","17:43:11",,"File not found: /index.cfm The specific sequence of files included or processed is: C:\Websites\SampleSite\wwwroot\index.cfm'' "
coldfusion.runtime.TemplateNotFoundException: File not found: /index.cfm
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:90)
	at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
	at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
	at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
	at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)
	at coldfusion.CfmServlet.service(CfmServlet.java:200)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
	at jrun.servlet.FilterChain.service(FilterChain.java:101)
	at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
	at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
	at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
	at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
	at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
	at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
	at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

The double single quotes at the end of index.cfm seemed to be very odd.  My setup was very basic apart from that fact that the IIS application pool identity was running with its own user.  It would seem to suggest this user account could not compile and write to ColdFusion WEB-INF folder.

The ColdFusion service needs to run on this same user account.  On the server in Services right click on “ColdFusion 9 Application Server” and select properties.  On the “Log On” tab select “This Account:” and enter the username and password used in the application pool identity.  Once done don’t forget to restart the service.  Reload the website and the error will disappear!

Migrating from Mango Blog to WordPress

I finally decided to move from Mango Blog to WordPress purely down to hosting and its costs.

I was on the hunt for something that would take all my posts, categories and comments and import them into the WordPress. I finally came a cross a blog entry by Marcos Placona where he wrote a script in CFML to import from Mango Blog to WordPress.

The scrip can be downloaded from here Mango2WordPress.

The script is pretty straight forward add the two data source names (Mango Blog and WordPress) and then run the scrip on the ColdFusion/Railo server.

I came across two issues

  1. No variable for set up for the table prefix in the Mango Blog database
  2. Everything but the post contents got migrated. Since I did not have many blog posts it was easy for me to copy and paste them over.

Transferring Contacts from Blackberry Torch 9800 Samsung Galaxy S4 GT-I9505

There are many different methods described on various online forums/blogs from downloading a CSV file from the Blackberry to sync’ing your contacts to your Google Mail account. All of these seemed long winded to me,I wanted something that would transfer directly between the two devices without using anything else as a go between.

The simplest way I found was to bluetooth the contacts over, don’t be alarmed you not have to do this one at a time for every entry you have in your contacts.

  1. Pair both devices to each other.
  2. On the blackberry goto Bluetooth Connections
  3. Click on the name of your Samsung Galaxy S4
  4. Select Transfer Contacts
  5. On the Samsung Galaxy S4 accept the contacts

This will transfer all of your phone book in one go within minutes if not seconds depending on how many entries you have.

Enjoy :)

[Macromedia][SQLServer JDBC Driver]Object has been closed.

I came across this very odd error today while trying to write a query in Coldfusion 9. I ensured the query worked in SQL Management Studio but each time I called the CFM page I was presented with the following error:

[Macromedia][SQLServer JDBC Driver]Object has been closed.

Having double checked everything, from my code to the set up of the server and DSN – everything looked perfectly as it should.

Finally, I stumbeled upon the solution: either resart the Coldfusion server or make a change to the DSN. I hope this helps saves others time as it took me forever to work this out.

ColdFusion Spool .cfmail Mail

Have you ever wondered why emails are not being delivered but keep building up in your ColdFusion spool folder? If so you have then probably seen an error message to this effect:

cfmail spool folder not processing MailXXXXXX.cfmail files.

This really got me going, one minute the emails was working and next minute it all stopped and nothing had changed. Being a live server the emails kept building up in the spool folder. Evenutally I figured out a solution or two.

A lock in the system can sometimes cause this kind of a behaviour. The first point of call would be to restart your ColdFusion Server. If this does not work then you need to look for the 0byte folder in your spool folder, this will be a corrupt file, remover this and you will see all your emails being sent out.