Can not inject service

Hello All

I have create service “testService.cfc” in service folder
and in handlers i wanna use this Service and here my code : property name=“testService” inject=“testService”;

But it not work:

Type: Builder.DSLDependencyNotFoundException
Messages: The DSL Definition {REF={null}, REQUIRED={true}, ARGNAME={}, DSL={id:testService}, JAVACAST={null}, NAME={testService}, TYPE={any}, VALUE={null}, SCOPE={variables}} did not produce any resulting dependency The target requesting the dependency is: ‘handlers.test1’

i don’t known why, Pls help me.


Are you using coldbox 4.0?

yes, Coldbox 4.0

Vào 21:50:49 UTC+7 Thứ Tư, ngày 13 tháng 5 năm 2015, Tropicalista đã viết:

Can you confirm a few things, when you say service folder. Do you mean the convention models folders?

And is this in the root of this.

If all the above is true, then you may have to reinit the application due to caching of handlers etc.