RE: [coldbox:18110] Re: [WireBox 1.6.0] Wirebox standalone installation instruction

That means that the dependency named “owner” can’t be found. I’m guessing this is because you have not supplied a binder config to WireBox. When WireBox is included with ColdBox, the default scan location is /models. I can’t find right off in the docs what the default scan location is for WireBox standalone so there probably isn’t one. So basically, you’ve told WireBox you need it to go get a copy of “owner” but you haven’t told it what owner is or where it can look for it.

If your CFCs are in a folder called foobar (and foobar was in the web root OR had a mapping to it), so the path to owner was “foobar.owner”, then you would just need to put a scan location of “foobar” in your binder config (which you hand to WireBox when creating it). Then test by doing wirebox.getinstance(“owner”). If that works, you should then be able to ask WireBox for “whois” and it will be able to located, create, and inject owner for you.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Many thanks! Now it works.

I have created a Binder.cfc in my app directory:

`

component extends=“wirebox.system.ioc.config.Binder” {

function configure(){

// The WireBox configuration structure DSL
wireBox = {
// Scope registration, automatically register a wirebox injector instance on any CF scope
// By default it registeres itself on application scope
scopeRegistration = {
enabled = true,
scope = “application”, // server, cluster, session, application
key = “wireBox”
},

// DSL Namespace registrations
customDSL = {
// namespace = “mapping name”
},

// Custom Storage Scopes
customScopes = {
// annotationName = “mapping name”
},

// Package scan locations
scanLocations = ["/whois"],

// Stop Recursions
stopRecursions = [],

// Parent Injector to assign to the configured injector, this must be an object reference
parentInjector = “”,

// Register all event listeners here, they are created in the specified order
listeners = [
// { class="", name="", properties={} }
]
};

}

}

`

I have also modified my component addingaccessors="true"

And now I can access with:

`

wirebox = createObject(“component”,“wirebox.system.ioc.Injector”).init(binder=“Binder”);
t = wirebox.getInstance(“whois.server”);

writeDump(t.getClient().lookup);

`