Question on loading Framework in 2.5.0

I just upgraded to 2.5.0 yesterday and now that the framework is
loaded in Application.cfc things don't work as they did in our
environment. There are only a few places in our app where we are
experimenting with ColdBox at the moment so we don't need the
framework loaded for every request.

I tried removing the calls to the framework in Application.cfc and
having the framework load up in the index.cfm file as it did in older
versions which fixed the issues in the main portion of our
application. But, when I go into a piece where the framework is needed
I get the following error.

The EVENTNAME argument passed to the init function is not of type

Is it okay to not load the framework up in Application.cfc if it's not
needed and only load it when a request comes through index.cfm?

I know my other option is to isolate the pieces that use it into their
own directory but eventually we want to move our entire application
into ColdBox.


You can use the index.cfm approach Ben. The backwards compatibility is still there, however you loose the session events.

So you can still segregate your app as needed. Please note that, if you leave the new application.cfc , a request will ONLY be executed by ColdBox if it is directed to the ‘index.cfm’ if you execute another cfm template, then ColdBox doesn’t run. That way, you can still have other cfm templates that have nothing to do with ColdBox. If you open the included Application.cfc on the onRequestStart method, you will see the inclusion of a coldbox request, if the incoming file is an index.cfm.

So I am at a loss of where you are seeing the problem. Can you describe it in more detail


Hi Luis,
I think the issue might have been around the framework being cached
in CF. After a restart of my CF service the index.cfm approach is
working as I expected. I'm going to go back and use the
Application.cfc approach and restart CF and see if that takes care of

Thank you for your help.


Does anyone know if there is a fix for this error:

An invalid event has been detected
An invalid event has been detected: handlers.main This event does not
exist in the specified handler.

The error occurred in C:\Inetpub\wwwroot\base\AwayX\coldbox\system\util
\util.cfc: line 20
Called from C:\Inetpub\wwwroot\base\AwayX\coldbox\system\services
\handlerService.cfc: line 144
Called from C:\Inetpub\wwwroot\base\AwayX\coldbox\system
\controller.cfc: line 331
Called from C:\Inetpub\wwwroot\base\AwayX\coldbox\system\coldbox.cfc:
line 205
Called from C:\Inetpub\wwwroot\base\AwayX\Application.cfc: line 78

18 : <cfargument name="type" type="string" required="no"
19 : <!---
************************************************************* --->
20 : <cfthrow type="#arguments.type#" message="#arguments.message#"
21 : </cffunction>
22 :

As soon as I move the framework loading back into Application.cfc I
get this error unless I pass in an event. I saw this was happening to
someone else and they fixed it by adding in the ExceptionHandler
value in the Config file. I've tried that but still get this error.
Not sure why it seems to ignore this <cfif findNoCase('index.cfm',
listLast(arguments.targetPage, '/'))>
      <cfset processColdBoxRequest()>

in the onRequestStart() function.

Any ideas?


Hi Ben

In your Application.cfc do you have this code…

Please let us know … or post your Application.cfc we will help you in up and running your app.


Sana is right,
You must make sure that the right Application.cfc is used, as per the application template. Also, if you are upgrading an app, make sure that your reinitialize it or reinit CF just to be on the safe side. I usually restart the CF service for any major framework upgrade. Just to make sure nothing is on memory.


I'm going to move this over to the ColdBox Forums since Google Groups
doesn't allow attachments.