[coldbox-4.0.0+00002-201412171130] HandlerService.EventHandlerNotRegisteredException

This is really baffling, I’ve just created a new test app, and for some reason I can’t get ColdBox to recognise any event action other than what’s under Main.cfc.

Here’s the command I used to create the app: “coldbox create app testapp --installColdBoxBE”

And after that I only did 2 things:

  1. Add this line in Application.cfc: this.mappings["/coldbox"] = getDirectoryFromPath(getCurrentTemplatePath()) & “coldbox”;

  2. Add Test.cfc under handlers, with the following content:

`
component {

// Default Action
function index(event,rc,prc){
writeDump(prc);abort;
}

// Do something
function list(event,rc,prc){
}
}
`

When I run http://localhost/testapp/index.cfm, it gives me the standard “Welcome to ColdBox…” page, so that works.

But if I run this: http://localhost/testapp/index.cfm?event=test&fwreinit=1, I get:

coldfusion.runtime.CustomException: The event: Test.index is not valid registered event.
at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795)
at cfHandlerService2ecfc1043548603$funcINVALIDEVENT.runFunction(C:\codebase\enigma\htdocs\testapp\coldbox\system\web\services\HandlerService.cfc:390)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2655)
at cfHandlerService2ecfc1043548603$funcGETHANDLER.runFunction(C:\codebase\enigma\htdocs\testapp\coldbox\system\web\services\HandlerService.cfc:162)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2428)
at cfController2ecfc1333238981$funcRUNEVENT.runFunction(C:\codebase\enigma\htdocs\testapp\coldbox\system\web\Controller.cfc:463)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:518)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:660)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:469)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2369)
at cfBootstrap2ecfc50942732$funcPROCESSCOLDBOXREQUEST.runFunction(C:\codebase\enigma\htdocs\testapp\coldbox\system\Bootstrap.cfc:197)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2655)
at cfBootstrap2ecfc50942732$funcONREQUESTSTART.runFunction(C:\codebase\enigma\htdocs\testapp\coldbox\system\Bootstrap.cfc:353)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2428)
at cfApplication2ecfc323810553$funcONREQUESTSTART.runFunction(C:\codebase\enigma\htdocs\testapp\Application.cfc:38)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108)
at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:278)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:419)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:112)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:30)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:219)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)

I added “writeDump(oEventHandler);abort;” to line 147 of HandlerService.cfc, and I get the following… as you can see, the component name correct, so it seems CB is at least able to find the file, but for some reason the “index” and the “list” methods are missing.

component testapp.handlers.Test
POSTHANDLER_ONLY [empty string]
EVENT_CACHE_SUFFIX [empty string]
PREHANDLER_EXCEPT [empty string]
AROUNDHANDLER_ONLY [empty string]
AROUNDHANDLER_EXCEPT [empty string]
ALLOWEDMETHODS
struct [empty]

$SUPER
PREHANDLER_ONLY [empty string]
$MIXED true
POSTHANDLER_EXCEPT [empty string]
METHODS
_ACTIONEXISTS
_PRIVATEINVOKER
ADDASSET
ANNOUNCEINTERCEPTION
CLEAR
CLEARFLASH
DISCARD
EXISTS
EXPOSEMIXIN
FLASHEXISTS
GET
GETCACHE
GETCONTROLLER
GETDATASOURCE
GETDEFAULTS
GETFLASH
GETINSTANCE
GETINTERCEPTOR
GETKEYS
GETMODEL
GETMODULECONFIG
GETMODULESETTINGS
GETMYPLUGIN
GETPLUGIN
GETPROPERTIES
GETPROPERTY
GETPROPERTYMIXIN
GETRENDERER
GETREQUESTCOLLECTION
GETREQUESTCONTEXT
GETSCOPE
GETSETTING
GETSETTINGSTRUCTURE
GETUTIL
INCLUDEITMIXIN
INCLUDEUDF
INFLATEFLASH
INIT
INJECTMIXIN
INJECTPROPERTYMIXIN
INVOKERMIXIN
ISEMPTY
KEEP
LOADAPPLICATIONHELPERS
LOCATEDIRECTORYPATH
LOCATEFILEPATH
METHODPROXY
ONCONFIGURATIONLOAD
ONSHUTDOWN
PERSISTRC
PERSISTVARIABLES
POPULATEMODEL
POPULATEPROPERTYMIXIN
PROPERTYEXISTS
PUT
PUTALL
REMOVE
REMOVEFLASH
REMOVEMIXIN
REMOVEPROPERTYMIXIN
RENDEREXTERNALVIEW
RENDERLAYOUT
RENDERVIEW
RUNEVENT
SAVEFLASH
SETCONTROLLER
SETDEFAULTS
SETNEXTEVENT
SETPROPERTIES
SETPROPERTY
SETSETTING
SETTINGEXISTS
SIZE
STATUSMARKS

I’m running CF10 on Apache 2.2.29 on Windows 7.