[ColdBox 4.1] [ColdBox 3.x] Compatibility module

As a completely new user to CommandBox and fairly new to the rest of this, I have a couple of quick (and possibly very stupid) questions

I have an existing app that USES ColdBox 3.x, as well as some Fusebox. (The app is in the process of being converted from Fusebox to ColdBox.) As such, the ColdBox core and the corresponding code/views/handlers/etc exist in subfolders (The core in /extensions/coldbox, the rest of the cb stuff in /extensions/cb) Note: I didn’t design it this way.

I have tried to upgrade to ColdBox 4 but so far have failed. As a fallback, I tried installing the Compatibility module. As far as I can tell, it added a cbcompat folder inside the modules folder and nothing else. What’s the next step? Is there anything more that needs to be done? I don’t see anything in the documentation…

Thanks and apologies in advance!

Can you please post the errors you’re getting with Coldbox 4? The compat module attempts to restore some of the 3.x behavior and plugins but it isn’t foolproof. It’s entirely possible your errors are totally unrelated though. Start back at the beginning and let us know the first error you run into.

As far as installing the module, yes that’s all that happens when a module installs-- it gets placed in the modules directory. The ColdBox framework loads it up automatically.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Hi Brad,

Regarding Compatibility mode, I get the following error:

Errorhandler: local — Event Name: onRequestStart

Cause
Exception - struct
Detail FWSetting flag is false
ErrorCode [empty string]
ExtendedInfo [empty string]
Message The setting ApplicationHelper does not exist.
StackTrace coldfusion.runtime.CustomException: The setting ApplicationHelper does not exist. at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795) at cfUtil2ecfc1726023248$funcTHROWIT.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\core\util\Util.cfc:164) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 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 cfController2ecfc1917921448$funcGETSETTING.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\Controller.cfc:332) 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 cfModuleConfig2ecfc1654051199$funcCONFIGURE.runFunction(C:\cfprojects\2747hero\extensions\cb\modules\cbcompat\ModuleConfig.cfc:65) 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.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 cfModuleService2ecfc464135908$funcLOADMODULECONFIGURATION.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\services\ModuleService.cfc:467) 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 cfModuleService2ecfc464135908$funcREGISTERMODULE.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\services\ModuleService.cfc:216) 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 cfModuleService2ecfc464135908$funcREGISTERALLMODULES.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\services\ModuleService.cfc:106) 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 cfModuleService2ecfc464135908$funcONCONFIGURATIONLOAD.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\services\ModuleService.cfc:40) 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 cfLoaderService2ecfc1675591936$funcLOADAPPLICATION.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\services\LoaderService.cfc:81) 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 cfColdbox2ecfc1778435000$funcLOADCOLDBOX.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\Coldbox.cfc:71) 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 cfColdbox2ecfc1778435000$funcRELOADCHECKS.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\Coldbox.cfc:102) 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 cfApplication2ecfc2114814963$funcONREQUESTSTART._factor0(C:\cfprojects\2747hero\Application.cfc:147) at cfApplication2ecfc2114814963$funcONREQUESTSTART.runFunction(C:\cfprojects\2747hero\Application.cfc:112) 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.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.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) 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)
Suppressed
Exception - array [empty]

TagContext
Exception - array
1
Exception - struct
COLUMN 0
ID CFTHROW
LINE 164
RAW_TRACE at cfUtil2ecfc1726023248$funcTHROWIT.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\core\util\Util.cfc:164)
TEMPLATE C:\cfprojects\2747hero\extensions\coldbox\system\core\util\Util.cfc
TYPE CFML

According to your stack trace, it appears you’re running ColdBox 3.x, not 4.x. The cbcompat module is intended to be installed into a ColdBox 4.x site.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Well, that clearly explains the second half of my problem. Thanks… :slight_smile:

Back to my original issue getting 4.x running directly:

struct
Detail [empty string]
Message The directory or file lib specified in LOADPATHS does not exist
StackTrace coldfusion.runtime.AppClassLoaderHelper$LoadPathNotFoundException: The directory or file lib specified in LOADPATHS does not exist at coldfusion.runtime.AppClassLoaderHelper.resolveLoadPaths(AppClassLoaderHelper.java:236) at coldfusion.runtime.AppClassLoaderHelper.init(AppClassLoaderHelper.java:145) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:301) 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.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) 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)
Suppressed
array [empty]

TagContext
array [empty]

Type Expression
path lib

I don’t see ColdBox anywhere in that stack trace. Are you using the “javasettings” in your Application.cfc? It appears your loadpaths setting points to a non-existent location.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Hi Brad,

I’m back after a couple of days off. First of all, thanks for taking the time to keep educating me without any visible disdain. :slight_smile:

Secondly, I’ve progressed some, but can’t seem to get wirebox to play nice, even trying to initialize it as the first step onApplicationStart()…

Exception - struct
Detail The instance could not be located in any declared scan location(s) () or full path location
ErrorCode [empty string]
ExtendedInfo [empty string]
Message Requested instance not found: ‘objsecurity’
StackTrace coldfusion.runtime.CustomException: Requested instance not found: ‘objsecurity’ at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2795) at cfInjector2ecfc447949883$funcGETINSTANCE.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\ioc\Injector.cfc:236) 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 cfSecurity2ecfc1216406625$funcAUTHORIZE.runFunction(C:\cfprojects\2747hero\extensions\cb\handlers\Security.cfc:33) 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:518) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2620) at cfEventHandler2ecfc2083330428$func_PRIVATEINVOKER.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\EventHandler.cfc:78) 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: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 cfController2ecfc1917921448$funcINVOKER.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\Controller.cfc:782) 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.CfJspPage._invokeUDF(CfJspPage.java:2620) at cfController2ecfc1917921448$func_RUNEVENT.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\Controller.cfc:618) 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.CfJspPage._invokeUDF(CfJspPage.java:2620) at cfController2ecfc1917921448$funcRUNEVENT.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\web\Controller.cfc:436) 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 cfBootstrap2ecfc1019933985$funcPROCESSCOLDBOXREQUEST.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\Bootstrap.cfc:196) 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 cfApplication2ecfc2114814963$funcONREQUESTSTART._factor1(C:\cfprojects\2747hero\Application.cfc:149) at cfApplication2ecfc2114814963$funcONREQUESTSTART.runFunction(C:\cfprojects\2747hero\Application.cfc:113) 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.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) 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)
Suppressed
Exception - array [empty]

TagContext
Exception - array
1
Exception - struct
COLUMN 0
ID CFTHROW
LINE 236
RAW_TRACE at cfInjector2ecfc447949883$funcGETINSTANCE.runFunction(C:\cfprojects\2747hero\extensions\coldbox\system\ioc\Injector.cfc:236)
TEMPLATE C:\cfprojects\2747hero\extensions\coldbox\system\ioc\Injector.cfc
TYPE CFML

2
Exception - struct
COLUMN 0
ID CF_TEMPLATEPROXY
LINE 33
RAW_TRACE at cfSecurity2ecfc1216406625$funcAUTHORIZE.runFunction(C:\cfprojects\2747hero\extensions\cb\handlers\Security.cfc:33)
TEMPLATE C:\cfprojects\2747hero\extensions\cb\handlers\Security.cfc
TYPE CFML

In wirebox, I’ve got this:

map(“objsecurity”).to(“cfc.utilities.security”).into(this.SCOPES.NOSCOPE);

And in the application, I’ve got this:

this.mappings["/cfc"] = expandPath("/hero/web/component");

Not sure why it’s not finding it…

Thanks again in advance!
Keith

> map(“objsecurity”).to(“cfc.utilities.security”).into(this.SCOPES.NOSCOPE);

The __.into(this.SCOPES.NOSCOPE)__bit is unnecessary since that’s the default.

> can’t seem to get wirebox to play nice

Is this functionality that was working in ColdBox 3.x? There weren’t any significant changes to how WireBox works in ColdBox 4. Are any modules in play here?

> even trying to initialize it as the first step onApplicationStart()

What, what? What are you doing in onApplicationStart()? You shouldn’t need to do anything to initialize WireBox. ColdBox does all that for you.

  • Where is your map().to() DSL? It should be in /config/WireBox.cfc.
  • How are you requesting the objsecurity instance? (show us the code)
  • Dump out wirebox.getBinder().getMappings() and see if your objsecurity mapping is in the list.
    Also note, I like to use the mapDirectory( ‘CFC’ ) method in the WireBox config to recursively map all the CFCs in a folder and its subfolders. Just add alias=“objsecurity” in the security.cfc to reference it by that name as wel.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

1. > map(“objsecurity”).to(“cfc.utilities.security”).into(this.SCOPES.NOSCOPE);

The __.into(this.SCOPES.NOSCOPE)__bit is unnecessary since that’s the default.

Good to know, thanks!

2. > can’t seem to get wirebox to play nice

Is this functionality that was working in ColdBox 3.x? There weren’t any significant changes to how WireBox works in ColdBox 4. Are any modules in play here?

Yes, this worked fine in Coldbox 3.x.
I do have an API module and a Relax module

3. > even trying to initialize it as the first step onApplicationStart()

What, what? What are you doing in onApplicationStart()? You shouldn’t need to do anything to initialize WireBox. ColdBox does all that for you.

I have application.wirebox = createObject(“component”,“coldbox.system.ioc.Injector”).init(“extensions.cb.config.WireBox”); as the first line of the onApplicationStart(). Is this not necessary?

  1. Where is your map().to() DSL? It should be in /config/WireBox.cfc.

It is.

  1. How are you requesting the objsecurity instance? (show us the code)

From the security handler:

public void function authorize(event, rc, prc) {
prc.title = “Check Authorization”;
local.objSecurity = wirebox.getInstance(“objsecurity”);

  1. Dump out wirebox.getBinder().getMappings() and see if your objsecurity mapping is in the list.

Here is that dump, placed in the function above:

struct
DSLDoc@relax
component coldbox.system.ioc.config.Mapping
METHODS

DSLService@relax
component coldbox.system.ioc.config.Mapping
METHODS

DataMarshaller@coldbox
component coldbox.system.ioc.config.Mapping
METHODS

HTMLHelper@coldbox
component coldbox.system.ioc.config.Mapping
METHODS

MSSQL_DAO@relaxlogs
component coldbox.system.ioc.config.Mapping
METHODS

MYSQL_DAO@relaxlogs
component coldbox.system.ioc.config.Mapping
METHODS

ORACLE_DAO@relaxlogs
component coldbox.system.ioc.config.Mapping
METHODS

ObjectMarshaller@coldbox
component coldbox.system.ioc.config.Mapping
METHODS

POSTGRES_DAO@relaxlogs
component coldbox.system.ioc.config.Mapping
METHODS

Relaxer@relax
component coldbox.system.ioc.config.Mapping
METHODS

Renderer@coldbox
component coldbox.system.ioc.config.Mapping
METHODS

XMLConverter@coldbox
component coldbox.system.ioc.config.Mapping
METHODS

coldbox.system.EventHandler
component coldbox.system.ioc.config.Mapping
METHODS

coldbox.system.Interceptor
component coldbox.system.ioc.config.Mapping
METHODS

hero.extensions.cb.handlers.Main
component coldbox.system.ioc.config.Mapping
METHODS

hero.extensions.cb.handlers.Security
component coldbox.system.ioc.config.Mapping
METHODS

interceptor-SES
component coldbox.system.ioc.config.Mapping
METHODS

interceptor-exception
component coldbox.system.ioc.config.Mapping
METHODS

interceptor-security
component coldbox.system.ioc.config.Mapping
METHODS

logService@relaxlogs
component coldbox.system.ioc.config.Mapping
METHODS

  1. Also note, I like to use the mapDirectory( ‘CFC’ ) method in the WireBox config to recursively map all the CFCs in a folder and its subfolders. Just add alias=“objsecurity” in the security.cfc to reference it by that name as well.

Thanks again!

Ok, so first thing-- get rid of that duplicate WireBox code in Application.cfc. Having more than one injector floating around is probably part of the problem. Secondly, even if you DID want to create a manual instance of WireBox (for a non-ColdBox app for example) you don’t need to set it into application. WireBox has automatic scope registration :slight_smile:

local.objSecurity = wirebox.getInstance(“objsecurity”);

Where is the “wirebox” variable coming from? Inside a handler, the “getInstance()” method should automatically be available to you.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

Well, removing the duplicate code from the Application.cfc and removing the leading wirebox variable (I just assumed it was needed) did nothing. After restarting coldfusion and rerunning the code, the error is exactly the same…

PS - I cannot tell you how much I appreciate the help. I am not too proud to admit when I’m over my head and glad there are people willing to help out.

So, to confirm…

  • You have a CFC in your application
  • This CFC is mapped in the WireBox config
  • You are requesting an instance of this CFC in a handler
  • The instance cannot be found.
    That’s a pretty common and simple scenario that should work the same in ColdBox 3.x and 4.x. There must be something else going on that we’re missing. Have you restarted the server just to make sure everything is fresh? Also, make sure there aren’t any old /coldbox mappings floating around at the server level either.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

That, in a nutshell is exactly it.

I have restarted the server, and do so every time I try something new.

This is the initial part of the application.cfc. Does anything seem out of place?

this[“sessionManagement”] = true;
this[“scriptProtect”] = true;
this.mappings = {}; //initialize the mappings property
this.rootDir = GetDirectoryFromPath(GetDirectoryFromPath(GetCurrentTemplatePath()).ReplaceFirst( “[\/]{1}$”, “” ));

//set EC mapping manually
this.mappings["/hero"] = expandPath("/hero/web");
this.mappings["/environmentConfig"] = expandPath("/hero/web/environmentConfig");
this.mappings["/cfc"] = expandPath("/hero/web/component");
this.mappings["/javaLoader"] = expandPath("/hero/lib/javaloader_v1.1/javaloader");
this.mappings["/utilities"] = expandPath("/hero/web/utilities");
this.mappings["/coldbox"] = expandPath("/hero/extensions/coldbox");
this.mappings["/extensions"] = expandPath("/hero/extensions");
this.mappings["/bugLog"] = expandPath("/hero/web/component/bugLog");
this.mappings["/ValidateThis"] = expandPath("/hero/web/component/ValidateThis");
this.mappings["/cfmongodb"] = expandPath("/hero/web/component/cfmongodb");

//set the Axis version to use when consuming web services

this.wssettings.version.consume = “1”;
this.sessionManagement = true;
this.sessionTimeout = createTimeSpan(0,0,30,0);
this.setClientCookies = true;

// COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP
COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath());
// The web server mapping to this application. Used for remote purposes or static purposes
COLDBOX_APP_MAPPING = “”;
// COLDBOX PROPERTIES
COLDBOX_CONFIG_FILE = “extensions.cb.config.Coldbox”;
// COLDBOX APPLICATION KEY OVERRIDE
COLDBOX_APP_KEY = “”;

// application start
public boolean function onApplicationStart(){
// Loading WireBox
// application.wirebox = createObject(“component”,“coldbox.system.ioc.Injector”).init(“extensions.cb.config.WireBox”);
initializeEnvironmentConfig();
application.cbBootstrap = new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING );
application.cbBootstrap.loadColdbox();

Attached is a stripped down Coldbox 4 site I just created via CommandBox. The easiest way to run it is to unzip it and run “box start” from the web root. It maps a CFC and then dumps it out in the handler. The best thing I can suggest is to go through and find out what’s different between your site and this working sample site.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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

hero.zip (360 KB)