Can not inject Service

24 views
Skip to first unread message

Khac Van Nguyen

unread,
May 13, 2015, 7:25:37 AM5/13/15
to col...@googlegroups.com
Hello All
I have create testService.cfc in services folder,and in handlers folder i want inject testService:
here my code:
property name="testService inject="testService";

But i 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.test'

pls Help me.

Thank.

Sana Ullah

unread,
May 13, 2015, 7:35:19 AM5/13/15
to col...@googlegroups.com
Hi Khac

Please read wirebox docs 

Coldbox 3.8

Coldbox 4



--
--
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/1d49ceaa-31e0-4dae-bd6d-39fc6a38e88c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brad Wood

unread,
May 14, 2015, 12:45:03 AM5/14/15
to col...@googlegroups.com, nguyenkh...@gmail.com
Please show us where the "services" folder is.  If it's
<webroot>/models/services/testService.cfc
then you can do this:
property name="testService inject="services.testService";

If it's in 
<webroot>/services/testService.cfc
then I would recommend you move it to the models convention folder.  Or, if it you want it there, add a scan location or an explicit mapping to WireBox.

Thanks!

~Brad
Reply all
Reply to author
Forward
0 new messages