RE: [coldbox:12920] Re: Error after upgrading to 3.5Beta

Juerg, I’m a little backed up at work right now so I can’t give a full explanation, but until later today here is some “light” reading on WireBox:

In short, you need to set enabled = true; in the wirebox struct of your coldbox config.
ModelMappings.cfm is now obsolete in favor of wirebox.cfc. Crack open one of the new application templates to get en example config file as well as what you’ll need in your main config to enable wirebox.

If you modelMappings.cfm was empty, I’m not sure how you resolved that property in the past, but you shouldn’t need to change your code. WireBox will look in your /model dir as the default scan location.
Otherwise, you can use the map(“productService”).to(“model.productService”).asSingleton(); DSL in your new WireBox config to tell WireBox how to create and persist your objects.

Also, the autowire interceptor is now obsolete. WireBox has been built into the core of the ColdBox framework and the interceptor shouldn’t be necessary any more to wire your handlers, interceptors, etc.



I've now included
  wireBox = {
    enabled = true,
in my Coldbox.cfc

and took the WireBox.cfc from the advanced Application template folder
and did a

I've also remove the AutoWire interceptor from Coldbox.cfc.

But now I don't no how to call a method in the "productService" from
my handler.
If I do a <cfset t = instance.productService.getData() /> in the
handler, I get an error "Element PRODUCTSERVICE is undefined in a Java
object of tyle class [Ljava.lang.string;."