Type: Builder.DSLDependencyNotFoundException Messages: The DSL Definition {REF={null}, REQUIRED={true}, ARGNAME={}, DSL={id:i18n@cbi18n}, JAVACAST={null}, NAME={i18n}, TYPE={any}, VALUE={null}, SCOPE={variables}} did not produce any resulting dependency The target requesting the dependency is: ‘coldbox.samples.handlers.Samples’
I thought this was because I was missing the i18n module, so I downloaded it from ForgeBox, extracted it to /coldbox/modules/cbi18n but the error persists.
It wouldn’t go under /coldbox/modules/cbi18n, it would be /coldbox/samples/modules/cbi18n
The i18n module is already listed as a dependency in the box.json, but you would need to run “install” in the samples directory with CommandBox to install it.
I see the modules folder has been added .gitignore. That was probably an oversight. There’s a really good argument to be made that the samples should not ship with their modules, and you should “install” each sample app, but most CF devs aren’t in that mindset.
For what it’s worth, all the rest of the sample apps should have their modules pre-installed. I think the main app is the only one that had them ignored. Also, fair warning, none of the sample apps that use the SES interceptor will work on Lucee (or Railo) because Adobe adds special magic to Tomcat to make the .cfm/ servlet mapping possible. You’ll need to add servlet mappings for each of those apps, or set up web roots in each of the application folders. In my opinion this is where the embedded server in CommandBox makes this way, way easy. Just CD into the folder and type “start”. Of course, CommandBox still uses Railo at the moment. We are currently working on our Lucee support.
Been struggling with a similar issue relating to the cbi18n module for coldbox 4. I have absolutely no issues injecting the resourceService into handlers via property injection using: property name=“resourceService” inject=“id:resourceService@cbi18n”; However, when attempting to use the resource service in a regular service object that happens to extends the cborm.models.VirtualEntityService, I get the following error error:
The DSL Definition {REF={null}, REQUIRED={true}, ARGNAME={}, DSL={id:resourceService@cbi18n}, JAVACAST={null}, NAME={resourceService}, TYPE={any}, VALUE={null}, SCOPE={variables}} did not produce any resulting dependency.
Detail: The target requesting the dependency is: ‘UserService@pc’.
For some odd reason the: instance.injector.containsInstance( modelName ) (469) in ioc/Builder.cfc is not finding the injected instance in the getModelDSL function. Oddly, the injection has worked on other service layer objects, and at other times just digs its heels in. My service component is pretty standard:
The models are probably being created before the modules load. Interceptors, for instance, are loaded prior to modules. If your security interceptor loads these models, it would cause Wirebox to create them prior to the ORM modules’ mappings being created.
I would recommend working around this chicken/egg issue with a provider, which will delay creation as long as the ORM objects are not actually needed to init the interceptor.