[CB 4.1] strange error with wirebox reference to cbvalidator

I am throwing an error in the cbvalidator that seems to have lost reference to itself from wirebox. I tried adding a reference in the scanlocations but that messed up the type matching for the result.

Error Requested instance not found: ‘cbvalidation.models.result.ValidationResult’

stack trace

coldfusion.runtime.CustomException: Requested instance not found: ‘cbvalidation.models.result.ValidationResult’ at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2991) at cfInjector2ecfc1392461611$funcGETINSTANCE.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\ioc\Injector.cfc:236) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfValidationManager2ecfc507166245$funcVALIDATE.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\modules\cbvalidation\models\ValidationManager.cfc:118) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:406) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2992) at cfProvider2ecfc1975808153$funcONMISSINGMETHOD.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\ioc\Provider.cfc:65) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:291) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:664) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfBaseService2ecfc249513130$funcVALIDATEMODEL.runFunction(G:\apps\sites\patientresource\www\model\BaseService.cfc:231) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfBase2ecfc442193401$funcVALIDATE.runFunction(G:\apps\sites\patientresource\www\handlers\Base.cfc:28) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at coldfusion.runtime.SuperScope.invoke(SuperScope.java:18) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfUser2ecfc1013088768$funcVALIDATE.runFunction(G:\apps\sites\patientresource\www\handlers\User.cfc:155) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at cfEventHandler2ecfc245536025$func_PRIVATEINVOKER.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\EventHandler.cfc:78) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfController2ecfc712450949$funcINVOKER.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\web\Controller.cfc:761) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at cfController2ecfc712450949$func_RUNEVENT.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\web\Controller.cfc:599) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at cfController2ecfc712450949$funcRUNEVENT.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\web\Controller.cfc:425) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfColdboxProxy2ecfc1866079892$funcPROCESS.runFunction(G:\apps\lib\frameworks\coldbox-4.1.0\system\remote\ColdboxProxy.cfc:121) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at coldfusion.runtime.SuperScope.invoke(SuperScope.java:18) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at cfCrud2ecfc1220479374$funcPROCESS.runFunction(G:\apps\sites\patientresource\www\proxies\Crud.cfc:4) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2810) at cfCrud2ecfc1220479374$funcVALIDATE.runFunction(G:\apps\sites\patientresource\www\proxies\Crud.cfc:71) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.filter.ComponentFilter.invoke(ComponentFilter.java:251) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:480) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:142) 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.xml.rpc.CFCServlet.invoke(CFCServlet.java:156) at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:348) at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) 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.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(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

I guess the best question to ask, do you have that module installed?

Yes in the stack trace its looks like its actually erroring in the module

G:\apps\lib\frameworks\coldbox-4.1.0\modules\cbvalidation\models\ValidationManager.cfc:118

the line in question is erroring on var results = wirebox.getInstance( name=“cbvalidation.models.result.ValidationResult”, initArguments=initArgs );

I think somehow wirebox is loosing its reference to the module, because if I dump Writedump( var=wirebox.getInstance( name=“coldbox.modules.cbvalidation.models.result.ValidationResult”),top=3); abort;

I get the module as I would expect.

I’d guess it’s related to the fact that validation is being called from a proxy. Do a quick test and add a /cbvalidation mapping to your application.cfc that points to /modules/cbvalidation (or wherever you’ve installed the module at) and see if that fixes it. If so, the automatic module mappings probably aren’t getting added for proxy requests.

Thanks!

~Brad

I, think you are right, I had tried that when I was troubleshooting the issue. I ended up rewriting the validation and not using the proxy at all, but if I run into this issue with the other crud proxies how would I go about adding module mappings on proxy requests? When I added the mapping to the application cfc it got past this error but still had a type error for results on line 139, I dumped the arguments and the type looked correct but for some reason the processrules function did not think the type was right.

ValidationManager function processRules(required cbvalidation.models.result.IValidationResult results,

Can you zip up a simple application that shows this error and put in a ticket? I’m guessing there needs to be a tweak with how modules are handled in proxies. As to your “second” error you uncovered, I’m not sure. I’d have to see more info on it. It could be related to how the component path is presenting itself. Again, and ticket and reproducible test case will be helpful.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

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