Hi,
we have an app (partially) using coldbox but also (partially) running a legacy code base.
We want to use wirebox on the legacy part and so we defined in the application.cfc that onapplicationstart wirebox should be initiated
like this =>
//Load ColdBox application.cbBootstrap = CreateObject("component","coldbox.system.Coldbox").init(COLDBOX_CONFIG_FILE,COLDBOX_APP_ROOT_PATH,COLDBOX_APP_KEY,COLDBOX_APP_MAPPING); application.cbBootstrap.loadColdbox(); application.injector = createObject("component","coldbox.system.ioc.Injector").init(); return true;then in some legacy page we try to use the injector like this=>
someModel = application.injector.getInstance(“modules.some.model.something”);
it fails on first attempt
# Element COLDBOXDSL is undefined in a Java object of type class [Ljava.lang.String;. The error occurred in //something/coldbox/system/ioc/Builder.cfc: line 318
Called from //something/coldbox/system/ioc/Injector.cfc: line 594
Called from //something/coldbox/system/ioc/Injector.cfc: line 481
Called from //something/coldbox/system/ioc/scopes/CFScopes.cfc: line 58
Called from //something/coldbox/system/ioc/Injector.cfc: line 261
Called from //something/some.cfm: line 2
Called from //something/some.cfm: line 1
|
<br>316 : // ColdBox Context DSL<br>317 : case "ioc" : case "ocm" : case "webservice" : case "javaloader" : case "coldbox" : { <br>**318 : refLocal.dependency = instance.coldboxDSL.process(argumentCollection=arguments); break;** <br>319 : } <br><br>
|
but works after a refresh
any idea on what i should do to avoid this first attempt error?
Thanks for any help