Model Injection Not Working

Hi there

Wondering if I could get some assistance on an issue..

I am trying to implement Coldbox with CF9, so am following the task
manager demo.

I am using coldbox version 2.6.4

I have set up tasks, and taskService cfcs in the model folder, the
same as in the demo...

I then have the following code in my task handler

component extends="coldbox.system.EventHandler" output="false"{
    property name="TaskService" inject;

  void function save(event) output=false{
    var rc = event.getCollection();
    rc.task = TaskService.getTask(event.getValue("taskID", ""));

    flash.put("message","Task saved sucessfully!");


However, when I call the "", i am getting the error message
taskService is undefined. Im wondering if there is some settings i
need to change to allow the injection of the model object, or if I am
doing something wrong.

Many thanks

Just out of curiosity, in your coldbox.xml.cfm, do you have the autowire interceptor enabled?


For v 2.6.4 you do have to explicitly enable it.

Doug :0)

I’m pretty sure the in 2.6.4 you can’t us:

property name=“TaskService” inject;


property name=“TaskService” type=“model:TaskService” scope=“variables”;

and see if that works


I would second as John Whish mentioned.

But I would be suggest to use coldbox v3.0 beta3 or SVN code-base.
In coldbox 3.0 new syntax works ( property name="TaskService"
inject; )


Hi there

property name="TaskService" type="model:TaskService"

Doesnt seem to be working, and when i install coldbox 3 I am recieving
the error message

Could not find the ColdFusion component or interface C:



Please check the compatibility guide. 2.6 version is not compatible with 3.0 as we are moving forward. Changes will be made,.

Inject is new for 3.0 ONLY and it will be the new standard instead of hijacking the “type” attribute like we did in 2.6.4. We will also deprecate _wireme in favor of inject also.


Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:

Ok, thanks for your responses.

I have installed coldbox 3, and it appears to be working now..

Mamy thanks