Wirebox definitions not the same in two places....

Ignore my example of "Base", "BaseService", etc (normally I wouldn't
instantiate those, was just testing). Also, this is using the nightly
build download just a couple days ago. Unless it was the bugfix hack
I emailed (Luis) about, I don't understand why it goes wrong.

So...in Wirebox config, I have this (partial):

    map('Base').to('com.x.core.base.Base');
    map('BaseEntity').to('com.x.core.base.BaseEntity');
    map('BaseService').to('com.x.core.base.BaseService');
    map('BaseFactory').to('com.x.core.base.BaseFactory');

    writeDump(listToArray(structKeyList(getMappings())));
    abort;

When it dumps, I see each of the mappings, as I would expect.
However, once I get to the handler, and do this:

    <cfset local.stMappings = wirebox.getBinder().getMappings() />
    <cfdump var="#listToArray(structKeyList(local.stMappings))#" />
    <cfabort />

....I get a list of handlers, plugins, validation, etc. Like so:

  coldbox.system.plugins.IOC
  coldbox.system.validation.ValidationManager
  ..handlers.Main
  ..handlers.General
  WireBoxValidationManagerPath
  WireBoxValidationManager
  coldbox.system.plugins.BeanFactory
  coldbox.system.Plugin
  coldbox.system.EventHandler

Unfortunately, my map() objects from Wirebox config are nowhere to be
found. Clearly the Wirebox config *is* firing, since my dump right
after the map() commands does indeed show output.

Thoughts?

(Sorry, just now saw the subject rules when I had Google flip to new groups view._

Its no longer BE Luis released it the other day.

Andrew, et. al:

Actually, that’s odd. So I updated to the 3.5.0 Final just now.

Getting this error (which I got the other day, too):
Error building: coldbox.system.validation.ValidationManager -> The parameter WIREBOX to function init is required but was not passed in. with constructor arguments: {}

Running Railo on Tomcat, under CentOS 6.2, builds also as of a couple days ago.
I was able to fix this in my local copy via a hack to the /system/ioc/builder.cfc file, buildCFC() function:

When you updated ColdBox did you restart ColdFusion?

So I determined the problem. This is a fun one and something I bet no one’s tried. So, I thought I’d be cute and move my entire CONFIG folder outside the webroot. I don’t like it there, even with .htaccess and app.cfm in there, I just don’t care for it. So…I was able to do this, with mappings. Clearly, the config/wirebox.cfc outside the root gets run, but it seems that Coldbox isn’t done with it yet, and decides later that there isn’t one or something and goes about it’s business and strips my prior definitions.

The Coldbox config itself clearly sticks, but not the Wirebox config when they are not [wwwroot]/config. I copied the config back into the root, dropped the mapping, and all seems to work as expected now. Might be something worth looking into for a possible change/fix.

However, I AM still having the ValidationManager issue. Even after a complete server restart, including Railo, Tomcat and the CentOS.

  • WB

Hmm, all of them should show up, weird

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Hmm, I just tested under Railo and Tomcat and cannot reproduce it for some reason.

As for your WireBox binder, the convention is /config/WireBox.cfc. However, you can change the location of your binder in the ColdBox.cfc WireBox section.

WireBox = {
binder = “my.path.to.Binder”
};

I don’t know why it should fail like if it cannot read the annotation maybe?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

I’m also getting the error…

Error building: coldbox.system.validation.ValidationManager -> The parameter WIREBOX to function init is required but was not passed in. with constructor arguments: {}

…when swapping out the Beta version of 3.5 for the Final version.

It looks like some config setting may have changed that I’ve missed. I current have this in my ColdBox.cfc…

wireBox = {
enabled = true
,singletonReload=true
};

interceptors = [
{class=“coldbox.system.interceptors.Autowire”,

properties = {
entityInjection = true
,entityInclude = ‘’
,entityExclude = ‘’
}
}

]

My coldbox and config folders are in the webroot as normal.

I’m running Railo Express 3.3.1

Is there anything else I can check/change/update?

Richard

Ok weird I think this is a Railo issue that cannot parse the annotations on the cfc via arguments. I will look into it and see

Update your Railo to the latest bleeding edge. This solves it.

Seemed to fix it. But not excited about “bleeding edge” for Railo with stable Coldbox.

Will Belden
“Where the beach?”

For what it’s worth, we’ve been running Railo bleeding edge in production for years. :slight_smile:

Roger that! I’m a ways off from my first production test anyway so it’ll probably get caught in a release before then.

Will Belden
“Where the beach?”

Yep, updating to bleeding edge version 3.3.2.003 fixed my issue with this as well. Thanks.