[coldbox:4079] Coldspring and Coldbox 3.0.0 M5

I am trying to integrate Coldbox with Coldbox.

This is my setup:

config/
coldspring.xml.cfm:
    <bean id="test" class="model.test" />

coldbox.xml.cfm
    <IOC>
      <Framework type="coldspring" reload="true"
objectCaching="false">config/coldspring.xml.cfm</Framework>
      <ParentFactory
type="coldspring">coldspring.beans.DefaultXMLBeanFactory</

    </IOC>

handler/
general.cfc
  public void function testingColdSpring(event){
    event.setValue("testBean", getPlugin("ioc").getBean("test"));
    event.setView("testingColdSpring");
  };

view/
testingColdspring.cfm
<cfoutput>
<p>Time the test.cfc bean was initiated: #rc.testBean.getInitiated()#</

</cfoutput>

When i try to access the site: http://localhost:8080/test/index.cfm?event=general.testingcoldspring
I get the following exception:
Oops! Exception Encountered
Application Execution Exception
Error Type: plugins.IOC.InvalidIoCFramework : [N/A]
Error Messages: The only available IoC supported frameworks are
coldspring and lightwire. You chose:

What's wrong?

not sure, it should be straightforward, can you post your full config and others can check it.

Luis F. Majano
President
Ortus Solutions, Corp

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

These are the lines of my coldbox.xml.cfm I have touched - any other
parts of this file were not changed from the advanced template file.

the plugin name is wrong, it is IOC not ioc try that.

Luis F. Majano
President
Ortus Solutions, Corp

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

Ok, i made the following change to the handler action

  public void function testingColdSpring(event){
    event.setValue("testBean", getPlugin("IOC").getBean("test"));
    event.setView("testingColdSpring");
  };

and re-startet Resin. The error is still there (...You chose: ) -
nothing???

Hi, i have made a run through the coldbox code with fusiondebug.

The instance.iocframework variable in C:\Resin\webapps\ROOT\coldbox
\system\plugins\IOC.cfc stays empty. Coldbox can read my factory
setting (COLDBOX_FACTORY = coldspring.beans.DefaultXmlBeanFactory)

but somehow it seems not to know that i am trying to use coldspring.

The docs are not up to date with the current coldbox.xml IOC settings,
so maybe i am doing something wrong with my configuration.

Just rechecked what happens during the request

On line 38 in coldbox.system.plugins.IOC
this function returns and sets an empty string for the IOCFRAMEWORK
variable:

// Setup the framework chosen in the config
setIOCFramework( getSetting("IOCFramework") );

Where do i have to tell coldbox that it should use coldspring. It
seems that this is not enough:
<IOC>
<Framework type="coldspring" reload="true"
objectCaching="false">config/coldspring.xml.cfm</Framework>
</IOC>

Been busy, so have not looked at this yet. Please bear with me. However, list, please help out here.

Luis F. Majano
President
Ortus Solutions, Corp

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

These are the lines of my coldbox.xml.cfm I have touched - any other
parts of this file were not changed from the advanced template file.
--------------------------------
<Setting name="AppName" value="Test"/>
<Setting name="AppMapping" value="/test"/>
<!--IOC Integration -->
<IOC>
<Framework type="coldspring" reload="true"
objectCaching="false">config/coldspring.xml.cfm</Framework>
<ParentFactory
type="coldspring">coldspring.beans.DefaultXmlBeanFactory</
>

Remove <ParentFactory> (it should be a configuration path, not a CFC
path anyway).

</IOC>

Here's what I have (and it works):

  <IOC>
    <Framework type="coldspring" reload="false"
objectCaching="false">config/ColdSpring.xml.cfm</Framework>
  </IOC>

Parent factory is still not supported until M6, so that can be ignored for now.

Luis F. Majano
President
Ortus Solutions, Corp

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

I have finally figured it out. I was so stupid to keep the file config/
Coldbox.cfc.

The coldbox.xml.cfm is never parsed because the function
createAppLoader in coldbox.system.services.LoaderService.cfc
finds the Coldbox.cfc and returns its values.

    if( listLast(coldboxSettings["ConfigFileLocation"],".") eq "cfc" ){
      instance.appLoader =
createObject("component","coldbox.system.web.loader.CFCApplicationLoader").init(controller);
      return instance.appLoader;
    }

    // Return XML Loader
    instance.appLoader =
createObject("component","coldbox.system.web.loader.XMLApplicationLoader").init(controller);
    return instance.appLoader;

Thank you for your time

Ahh yes, CFC takes precedence over the XML file.

Luis F. Majano
President
Ortus Solutions, Corp

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