RE: [coldbox:15500] [Coldbox - 3.5] The event is not valid registered event

484 views
Skip to first unread message

br...@bradwood.com

unread,
Jul 16, 2012, 3:56:45 PM7/16/12
to col...@googlegroups.com
Can you start by confirming if the ColdFusion mappings are the same between your local environment and your dev server?  Are you using SES urls?

normal URL:

SES URL:

Can you paste in the URL exactly as it is in your browser when you see that error?

And to confirm, you should have a file called home.cfc in your handlers directory with a public method called "lookup". 

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: br...@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com 


-------- Original Message --------
Subject: [coldbox:15500] [Coldbox - 3.5] The event is not valid
registered event
From: Adam <adamfr...@gmail.com>
Date: Mon, July 16, 2012 2:45 pm
To: col...@googlegroups.com

Hi all,
I'm complete new to ColdBox and ColdFusion for that matter. I've developed an application to do a simple lookup of information from a database and display it. I have the App completely working on my local machine but when I move the application to our DEV environment I get: 

Error Type: HandlerService.EventHandlerNotRegisteredException : [N/A]Error Messages: The event: Home.lookup is not valid registered event.

I tried dumping my registered Handlers by getSetting("RegisteredHandlers"); and it is showing Home as a registered handler.

I also am setting  setBaseURL("https://#cgi.HTTP_HOST#/index.cfm"); within Routes.cfm if that makes a difference? 

Any help would be much appreciated, thanks in advance!
 
Also, here is the stack trace, let me know if any more information is needed:

		Stack Trace:
	 
	 
		
			
coldfusion.runtime.CustomException: The event: Home.lookup is not valid registered event.
	at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:124)
	at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)
	at cfUtil2ecfc381172608$funcTHROWIT.runFunction(D:\apps\SFIS\coldbox\system\core\util\Util.cfc:164)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222)
	at cfHandlerService2ecfc1757598471$funcINVALIDEVENT.runFunction(D:\apps\SFIS\coldbox\system\web\services\HandlerService.cfc:384)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
	at cfHandlerService2ecfc1757598471$funcGETHANDLER.runFunction(D:\apps\SFIS\coldbox\system\web\services\HandlerService.cfc:156)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2272)
	at cfController2ecfc269456738$funcRUNEVENT.runFunction(D:\apps\SFIS\coldbox\system\web\Controller.cfc:494)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222)
	at cfColdbox2ecfc1720314610$funcPROCESSCOLDBOXREQUEST.runFunction(D:\apps\SFIS\coldbox\system\Coldbox.cfc:236)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)
	at cfApplication2ecfc1124088446$funcONREQUESTSTART.runFunction(D:\apps\SFIS\ferpa\Application.cfc:63)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308)
	at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:74)
	at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:221)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:264)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
	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.CfmServlet.service(CfmServlet.java:175)
	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$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
	at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
 
 
 

Adam

unread,
Jul 16, 2012, 4:37:05 PM7/16/12
to col...@googlegroups.com
Hi Brad,

Thanks for your quick response.

I can't confirm if the mappings are the same currently since I am not the admin of the DEV server but I have asked. As for your other questions

I am using SES urls
Basically when I call locally:

http://localhost:8500/myapp/index.cfm/home/lookup/id/90018 

The application returns the expected results but when I call on our DEV server:

https://DEVSERVER:60141/index.cfm/home/lookup/id/90018

I get the error stated previously. And I do have a home.cfc in the handlers directory with a public method called "lookup". 

Thanks agian!
To unsubscribe from this group, send email to coldbox-unsubscribe@googlegroups.com

br...@bradwood.com

unread,
Jul 16, 2012, 5:18:27 PM7/16/12
to col...@googlegroups.com
Hmm, is it perhaps a case-sensitivity issue if you are developing on Windows and deploying to Linux.  I'm not actually even positive off the top of my head if that matters for handlers, but it's worth looking into.
Your host names and ports are an interesting setup for sure, but I'm not sure that it would affect ColdBox resolving the handler.

Can you show us the code in your home handler?

Also, is your coldbox folder in the web root, or are you using an application-specific or server-level mapping to find it ?
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com

br...@bradwood.com

unread,
Jul 16, 2012, 5:27:53 PM7/16/12
to col...@googlegroups.com, O...@bradwood.com
Oh, something else to look at is the appMapping setting.  This is auto-calculated by ColdBox.  It looks like it should be "myapp/" on local and "" on dev.  You'll probably have issues with your base URL as well if it doesn't that that into account.

Adam

unread,
Jul 17, 2012, 9:22:30 AM7/17/12
to col...@googlegroups.com, O...@bradwood.com
Hi Brad,

Both environments are windows. Also, I know that Coldbox isn't in the Webroot, but it is in the same root of the folder where the application is stored, and I believe we are using server-level mapping but am not positive.
I'll try setting the appMapping setitng.

Here is the code for the home.cfc handler, we use a web service to get the data:

component output="false"{
property name="remoteProxy" inject="coldbox:myPlugin:remoteProxy";
this.event_cache_suffix = "";
this.prehandler_only = "";
this.prehandler_except = "";
this.posthandler_only = "";
this.posthandler_except = "";
this.aroundHandler_only = "";
this.aroundHandler_except = "";
/* HTTP Methods Allowed for actions. */
/* Ex: this.allowedMethods = {delete='POST,DELETE',index='GET'} */
this.allowedMethods = structnew();


public function index(event){
var rc = event.getCollection();
rc.layout = event.getValue("layout", "main");
if(rc.layout eq "channel"){
event.setLayout("Layout.Channel");
}
event.setView("home/index");
}



public function lookup(event){
var rc = event.getCollection();
rc.id = event.getValue("id", "");
rc.index = event.getValue("index", "1");
rc.netid = event.getValue("netid", "1");
if(getSetting("env") eq "local"){
var rc.address = remoteProxy.get("http://localhost:8500/ws/index.cfm/person/Address", {id=rc.ndid,index=rc.index, netid=rc.netid }, true);
}
else if(getSetting("env") eq "dev"){
var rc.address = remoteProxy.get("http://ws-dev.com/ ", {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
else if(getSetting("env") eq "test"){
//TODO
//var rc.address = remoteProxy.get("http://localhost:8500/ws/index.cfm/person/Address", {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
else{
//TODO
                        //var rc.address = remoteProxy.get("http://localhost:8500/ws/index.cfm/person/Address", {id=rc.id,index=rc.index, netid=rc.netid }, true);
}
event.renderData("text", rc.address.response);
//event.renderData("text", rc.address.request);

br...@bradwood.com

unread,
Jul 17, 2012, 11:55:15 AM7/17/12
to col...@googlegroups.com
Hmm, I'm not quite sure.  I noticed your handler component doesn't extend "coldbox.system.eventhandler" but you say it's working on your local environment so I'm confused.  It seems like it would have to be a configuration issue.

Also, the CF mappings are not a requirement.  If you have no CF mapping called "coldbox", then simply placing the coldbox folder in your web root will work.  However, seeing as how your environments use different folder structures, it might be handy for you to set app-specific mappings.  You can make them dynamic (relative) based on where the app is deployed. 

Something to the effect of this in your application.cfc should get you started:
this.mappings['/coldbox'] = getDirectoryFromPath(getCurrentTemplatePath()) & 'coldbox';

Also, a couple unrelated notes on your code-- Since you're on ColdBox 3.5, your actions get event, rc, and prc passed into the arguments.  That means the var rc = event.getCollection();
  bit isn't required any more in your handler methods.  You can access rc directly. (It resolves to the arguments scope)

Also, I would recommend looking into environment overrides in your config.  You can have ColdBox automatically sniff out what environment you're on with some regex, and then override settings appropriately.  That means your big if statement trying to figure out what web service URL to use could go away in favor of getSetting("currentWebserviceURL") which would pull the appropriate one based your config's environment overrides.
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages