Coldbox 4 upgrade, cbstorages injection

264 views
Skip to first unread message

David Mooney

unread,
May 4, 2015, 6:06:04 PM5/4/15
to col...@googlegroups.com
I am working toward upgrading our application to coldbox 4 (from 3.5.3) and I have hit my first roadblock, I cant seem to make coldbox recognize the new injection syntax

in one of my interceptors I am using session storage and when I try loading the property via a wirebox injection I get the following error. 

I have tried the following combinations.

property name="SessionStorage" inject="sessionStorage@cbstorages";
property name="SessionStorage" inject="model:sessionStorage@cbstorages";

I have installed cbstorages using commandbox but it seems that wirebox doesn't know how to access them?


The DSL Definition {JAVACAST={null},NAME={SessionStorage},ARGNAME={},DSL={model:sessionStorage@cbstorages},VALUE={null},SCOPE={variables},REQUIRED={true},REF={null},TYPE={any}} did not produce any resulting dependency


any tips? 

br...@bradwood.com

unread,
May 4, 2015, 6:09:44 PM5/4/15
to col...@googlegroups.com
Have you reinitted the app?  What does a dump of wirebox.getBinder().getMappings() show?

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 ---------
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/15ccb6fd-c888-48ab-8bf8-a62eaf1bcc03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Mooney

unread,
May 4, 2015, 6:30:00 PM5/4/15
to col...@googlegroups.com
Yes I reinitted, I am not sure how to dump that as it errors before the application really loads? I dumped wirebox at the end of the wirebox cfc and got the following 
Capture.PNG

br...@bradwood.com

unread,
May 4, 2015, 6:36:14 PM5/4/15
to col...@googlegroups.com
Ahh, I missed that you are using this in an interceptor. Interceptors load prior to modules so the session storage models don't exist yet. 
 
You can work around this by delaying the building of the model by using the "provider" namespace.
 
property name="SessionStorage" inject="provider:sessionStorage@cbstorages";
--------- Original Message ---------

David Mooney

unread,
May 5, 2015, 2:03:12 PM5/5/15
to col...@googlegroups.com
That seems to work! thank you, 

David Mooney

unread,
May 5, 2015, 2:55:52 PM5/5/15
to col...@googlegroups.com
I spoke too soon, I am now getting the error 

The DSL Definition {NAME={},DSL={id:sessionStorage@cbstorages},REQUIRED={true}} did not produce any resulting dependency

The target requesting the dependency is: 'ExplicitCall'

br...@bradwood.com

unread,
May 5, 2015, 3:20:15 PM5/5/15
to col...@googlegroups.com
Where is the code that is calling it?  Since it says "explicitcall" that means there is something like wirebox.getInstance('sessionStorage@cbstorages') in your code somewhere running before the module is loaded.
--------- Original Message ---------

David Mooney

unread,
May 5, 2015, 3:45:55 PM5/5/15
to col...@googlegroups.com
That is true I do have it in the wirebox.cfc I tried adding the provider namespace but it did not seem to have any effect.

map( "SessionStorage" ).toDSL( "SessionStorage@cbstorages" );
map( "SessionStorage" ).toDSL( "provider:SessionStorage@cbstorages" );

br...@bradwood.com

unread,
May 5, 2015, 3:59:19 PM5/5/15
to col...@googlegroups.com
I don't think that's it since the mapping won't actually create an instance.  Paste in the stack trace of the error and that should tell us where it's being created.
--------- Original Message ---------
Message has been deleted

David Mooney

unread,
May 5, 2015, 4:36:55 PM5/5/15
to col...@googlegroups.com
coldfusion.runtime.CustomException: The DSL Definition {NAME={},DSL={id:sessionStorage@cbstorages},REQUIRED={true}} did not produce any resulting dependency
	at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142)
	at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
	at cfBuilder2ecfc884110411$funcBUILDDSLDEPENDENCY.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\ioc\Builder.cfc:379)
	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:517)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
	at cfBuilder2ecfc884110411$funcBUILDSIMPLEDSL.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\ioc\Builder.cfc:309)
	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:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at cfInjector2ecfc428758120$funcGETINSTANCE.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\ioc\Injector.cfc:218)
	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:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at cfProvider2ecfc1355456423$funcGET.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\ioc\Provider.cfc:49)
	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:2582)
	at cfProvider2ecfc1355456423$funcONMISSINGMETHOD.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\ioc\Provider.cfc:63)
	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:280)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:512)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
	at cfSecurity2ecfc74200047$funcPREEVENT.runFunction(G:\apps\sites\application\interceptors\Security.cfc:8)
	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:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)
	at cfInterceptorState2ecfc1309889545$funcINVOKER.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\context\InterceptorState.cfc:369)
	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:517)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
	at cfInterceptorState2ecfc1309889545$funcPROCESSSYNC.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\context\InterceptorState.cfc:260)
	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:517)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
	at cfInterceptorState2ecfc1309889545$funcPROCESS.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\context\InterceptorState.cfc:121)
	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:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at cfInterceptorService2ecfc865521322$funcPROCESSSTATE.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\services\InterceptorService.cfc:139)
	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:491)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
	at cfController2ecfc1403457284$func_RUNEVENT.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\Controller.cfc:531)
	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:517)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
	at cfController2ecfc1403457284$funcRUNEVENT.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\web\Controller.cfc:425)
	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:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at cfBootstrap2ecfc1502425629$funcLOADCOLDBOX.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\Bootstrap.cfc:74)
	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:2582)
	at cfBootstrap2ecfc1502425629$funcRELOADCHECKS.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\Bootstrap.cfc:107)
	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:2582)
	at cfBootstrap2ecfc1502425629$funcONREQUESTSTART.runFunction(G:\apps\lib\frameworks\coldbox-4.0.0\system\Bootstrap.cfc:350)
	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:491)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
	at cfApplication2ecfc706787953$funcONREQUESTSTART.runFunction(G:\apps\sites\application\Application.cfc:103)
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:491) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:355) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27) 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.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:201) 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)

David Mooney

unread,
May 5, 2015, 4:42:00 PM5/5/15
to col...@googlegroups.com
I see what you are saying now, the interceptor has a preEvent that is trying to get the session storage, I am guessing the provider injections are not yet resolved. Is there any way around that?

br...@bradwood.com

unread,
May 5, 2015, 4:54:14 PM5/5/15
to col...@googlegroups.com
Hnmm, the framework (including modules) should be loaded by the time preEvent is called.  Can you show us your config?  Specifically, do you have modules auto reload turned on?  More than one request firing at the same time could be creating some race conditions.
 
Also, you can put some debugging code in the interceptor to verify what modules are loaded when the error happens.  Try #getSetting( 'modules' )#
--------- Original Message ---------

David Mooney

unread,
May 5, 2015, 5:26:00 PM5/5/15
to col...@googlegroups.com
autoReload = false in my config file I dumped the modules as you suggested and this is what got. It doesnt look like its loading the modules from my modulesExternalLocation, 
Capture.PNG

David Mooney

unread,
May 5, 2015, 6:27:31 PM5/5/15
to col...@googlegroups.com
I apparently had a missing slash in my config, the first slash is required.

modulesExternalLocation = ["/coldbox/modules"],

the Module loads now

...
Reply all
Reply to author
Forward
0 new messages