Problem with Autowiring

Hi. I am having some trouble trying to implement autowiring and hoped
someone could help.

I have a abstractHandler which all my other handlers will inherit from
and within this handler I have two properties.

component autowire="true" {
    property name="someObject" inject="model:myObject";
    property name="mySecondObject" inject="model";

    public abstractHandler function init() {
        return this;

With my models defined:

component displayname="myObject" accessors="true" singleton {
    property name="someSetting" type="string"

<cfcomponent displayname="mySecondObject" accessors="true" singleton>

Now from my understanding of autowiring, that should work. However I
get the error:

Error autowiring handlers.Main. The DSL Definition
did not produce any resulting dependency The target requesting the
dependency is: 'handlers.Main'

It seems the injection in my models is fine because if I remove the
properties in the abstractHandler and in the init function add:

someObject = application.wirebox.getInstance("models.myObject");
mySecondObject =

everything works fine. My Wirebox.cfc is the same as when I downloaded
and my config is defined:

wireBox = {
    enabled = true,
    singletonReload = true

interceptors = [
properties={ debugMode=true }}

Does anyone have any ideas as to what I am doing wrong here?

Can you post the handler target

Luis Majano
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408

component extends="abstractHandler" {
        public main function init() {
                return this;
        public void function onRequestStart(any event) {
                request.someObject = someObject;
                request.mySecondObject= mySecondObject;

I have something similar in lots of places, did you reinit the fw. Also, why are you using “request” scope?

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


Yes I have reinitialised the fw. The idea is have a reference to the
object in the request scope so I can easily use the methods across the
site (for example a helper object). I suppose I could use a plugin.

I really can't see what I am doing wrong! I have uploaded the simple
example above to my dropbox. Would you mind taking a look to see if I
done something obviously wrong?

Ok - so I have solved my issue. Embarrassingly my model directory was
models and I hadn't added the convention to the config. Woops.