look ma, no xml! revision 2843 challenge

4 views
Skip to first unread message

Doug Boude

unread,
Dec 12, 2009, 2:31:19 AM12/12/09
to col...@googlegroups.com
When I updated my CB tonight, an app I'm working on suddenly began dying in the early stages of initialization. Since my svn update included about the last six revisions, I reverted to where I was before I did the update, then stepped through the revision updates one at a time, testing my app after each one. It worked fine all the way until I updated to revision 2843. I attempted to figure out exactly why, but after a half hour of poking around in the guts of CB, figured I'd leave it to the experts to determine if something was perhaps overlooked in the code to go "sans xml", or if maybe there's something I need to change in my app for the latest revision to work correctly (I'm still using xml).

Here is my error and stack trace:

The value returned from the getAppLoader function is not of type coldbox.system.web.loader.AbstractApplicationLoader.

If the component name is specified as a return type, its possible that a definition file for the component cannot be found or is not accessible.
 
The error occurred in D:\Inetpub\wwwroot\coldbox\system\interceptors\EnvironmentControl.cfc: line 34
Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 153
Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 68
Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 42
Called from D:\Inetpub\wwwroot\coldbox\system\services\LoaderService.cfc: line 78
Called from D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 71
Called from D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 92
Called from D:\Inetpub\wwwroot\DreamBlog\Application.cfc: line 48
32 : 			
33 : 			// App Loader
34 : 			instance.appLoader = controller.getLoaderService().getAppLoader();
35 : 			
36 : 			// Verify that the configFile propety is set

Resources:

Browser   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.15) Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)
Remote Address   127.0.0.1
Referrer  
Date/Time   12-Dec-09 01:18 AM
Stack Trace
at cfEnvironmentControl2ecfc1744212768$funcCONFIGURE.runFunction(D:\Inetpub\wwwroot\coldbox\system\interceptors\EnvironmentControl.cfc:34) at cfInterceptorService2ecfc1633491061$funcREGISTERINTERCEPTOR.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:153) at cfInterceptorService2ecfc1633491061$funcREGISTERINTERCEPTORS.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:68) at cfInterceptorService2ecfc1633491061$funcONCONFIGURATIONLOAD.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:42) at cfLoaderService2ecfc1759907683$funcLOADAPPLICATION.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\LoaderService.cfc:78) at cfColdbox2ecfc1445652723$funcLOADCOLDBOX.runFunction(D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc:71) at cfColdbox2ecfc1445652723$funcRELOADCHECKS.runFunction(D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc:92) at cfApplication2ecfc2012761918$funcONREQUESTSTART.runFunction(D:\Inetpub\wwwroot\DreamBlog\Application.cfc:48)

coldfusion.runtime.UDFMethod$InvalidReturnTypeException: The value returned from the getAppLoader function is not of type coldbox.system.web.loader.AbstractApplicationLoader.
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:385)
	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 cfEnvironmentControl2ecfc1744212768$funcCONFIGURE.runFunction(D:\Inetpub\wwwroot\coldbox\system\interceptors\EnvironmentControl.cfc:34)
	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 cfInterceptorService2ecfc1633491061$funcREGISTERINTERCEPTOR.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:153)
	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.CfJspPage._invokeUDF(CfJspPage.java:2436)
	at cfInterceptorService2ecfc1633491061$funcREGISTERINTERCEPTORS.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:68)
	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 cfInterceptorService2ecfc1633491061$funcONCONFIGURATIONLOAD.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc:42)
	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 cfLoaderService2ecfc1759907683$funcLOADAPPLICATION.runFunction(D:\Inetpub\wwwroot\coldbox\system\services\LoaderService.cfc:78)
	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 cfColdbox2ecfc1445652723$funcLOADCOLDBOX.runFunction(D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc:71)
	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 cfColdbox2ecfc1445652723$funcRELOADCHECKS.runFunction(D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc:92)
	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 cfApplication2ecfc2012761918$funcONREQUESTSTART.runFunction(D:\Inetpub\wwwroot\DreamBlog\Application.cfc:48)
	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$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)

Luis Majano

unread,
Dec 12, 2009, 12:26:19 PM12/12/09
to col...@googlegroups.com
Doug did you restart your engine toclear the memory stubs

On Friday, December 11, 2009, Doug Boude <doug...@gmail.com> wrote:
> When I updated my CB tonight, an app I'm working on suddenly began dying in the early stages of initialization. Since my svn update included about the last six revisions, I reverted to where I was before I did the update, then stepped through the revision updates one at a time, testing my app after each one. It worked fine all the way until I updated to revision 2843. I attempted to figure out exactly why, but after a half hour of poking around in the guts of CB, figured I'd leave it to the experts to determine if something was perhaps overlooked in the code to go "sans xml", or if maybe there's something I need to change in my app for the latest revision to work correctly (I'm still using xml).
>
> Here is my error and stack trace:
>
>
>
> The value returned from the getAppLoader function is not of type
> coldbox.system.web.loader.AbstractApplicationLoader.
>
>
>
>
>
> If the component name is specified as a return type, its possible that
> a definition file for the component cannot be found or is not
> accessible.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> The error occurred in D:\Inetpub\wwwroot\coldbox\system\interceptors\EnvironmentControl.cfc: line 34
> Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 153
> Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 68
> Called from D:\Inetpub\wwwroot\coldbox\system\services\InterceptorService.cfc: line 42
> Called from D:\Inetpub\wwwroot\coldbox\system\services\LoaderService.cfc: line 78
> Called from D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 71
> Called from D:\Inetpub\wwwroot\coldbox\system\Coldbox.cfc: line 92
> Called from D:\Inetpub\wwwroot\DreamBlog\Application.cfc: line 48
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 32 :
> 33 : // App Loader
> 34 : instance.appLoader = controller.getLoaderService().getAppLoader();
> 35 :
> 36 : // Verify that the configFile propety is set
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Resources:
>
>
>
> Check the ColdFusion documentation <http://www.macromedia.com/go/proddoc_getdoc> to verify that you are using the correct syntax.
> Search the Knowledge Base <http://www.macromedia.com/support/coldfusion/> to find a solution to your problem.
> --
> You received this message because you are subscribed to the Google Groups "ColdBox: A ColdFusion Framework" 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 more information, visit http://www.luismajano.com/projects/coldbox
> For Documentation, visit  <http://ortus.svnrepository.com/coldbox/trac.cgi>

--
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Luis Majano

unread,
Dec 12, 2009, 12:42:38 PM12/12/09
to col...@googlegroups.com
GOt it!!

And committ it, nice oversight on my part.

By the way, loading a coldbox app with a cfc instead of xml, makes things start almost instant.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com


Doug Boude

unread,
Dec 12, 2009, 2:41:06 PM12/12/09
to col...@googlegroups.com
Luis, when you say 'restarting the engine' are you referring to restarting cf itself? If so, no, I didn't do that; I only restarted the framework.

Glad you tracked down the issue...I'll try updating again today.

Question: does this new change only apply to the coldbox.XML, or can I convert my other config files too? And, how far back cf version-wise is this change compatible? (do I need cf 9?)

Thanks Luis!

Sent from my iPhone

Sana

unread,
Dec 12, 2009, 4:43:08 PM12/12/09
to ColdBox Platform
Hi Doug,

The new coldbox.cfc config will be compatible with CF8 and above.

Thanks
Sana

Luis Majano

unread,
Dec 12, 2009, 5:39:13 PM12/12/09
to col...@googlegroups.com
yes, cf8 and above.  The Coldbox.cfc can kickstart applications now with EMBEDDED environment control

It has environment control included, no more interceptor.

All you do is declare an environments struct with keys as names of environments and values as a list of regex patterns to match agains cgi.http_host.  This is default detection.  If you want your own detection, then just create a method called : detectEnvironment() that returns a string (the environment key).  Then, we call a method on your config cfc that matches the name of your environment, ex: development().  So you can override or do what you want in that environment.  All in one cfc.


environments = {
  dev = "localhost,^cf8.*"
};


public void function dev(){
  do your stuff here.
}


public string function detectEnvironment(){
  do your own detection here.
}

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com



--

Dorioo

unread,
Dec 13, 2009, 11:21:00 AM12/13/09
to col...@googlegroups.com
Some feedback. By default, the "environment" value in
"controller.getSetting("Environment")" remains as "Production"
regardless of the environment you're in.

I was able to explicitly state the value by using the code below in my
development() method. However, if coldbox already knows the
environment it is in (as it's running the development() method) ,
maybe it should set this value for you.

settings = {
// Environment
environment = "development",
}

- Gabriel

Luis Majano

unread,
Dec 13, 2009, 6:57:23 PM12/13/09
to col...@googlegroups.com
This might be a missed thing by me. I will check it soon as it is
supposed to set it for you.

John Whish

unread,
Dec 14, 2009, 6:31:13 AM12/14/09
to col...@googlegroups.com
I'm just testing out the new ColdBox.cfc for config settings and so far pretty cool - nice work guys! Expect you have already got this on the "known issues" list, but the unit tests fail if you don't have a ColdBox.xml.cfm (or uses it if you have both). I tracked it down to line 100 of BaseTestCase.cfc:

// Config.xml by convention if not set before setup() call.
if(NOT len(instance.configMapping) ){
  instance.configMapping = appRootPath & "config/coldbox.xml.cfm";
}

Really impressed by ColdBox 3 - thanks for your efforts :)

- John

Luis Majano

unread,
Dec 14, 2009, 12:57:07 PM12/14/09
to col...@googlegroups.com
Thanks John,

Next step is to tackle unit testing.  


Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com


--
Reply all
Reply to author
Forward
0 new messages