Our Forums are now closed. Please go to our Google Mailing List for help. This site will remain open for historical purposes.
ColdBox Framework Forums Home | Profile | Search | Login | RSS

 pdf Print PDF   Previous Page  Page: 1   Next Page

Thread: ColdBox 3 M4 - ColdSpring Create Config Bean not working
Created on: 02/07/10 01:59 PM Replies: 7
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/07/10 1:59 PM

Hi everyone,

using ColdBox 3 new config.cfc I can no longer get my datasource into my coldspring file....

<bean id="coldboxFactory" class="coldbox.system.ioc.ColdboxFactory" />

<!--Create Config Bean-->

<bean id="ConfigBean" factory-bean="ColdboxFactory" factory-method="getConfigBean" />

<!--Create DNS Bean-->

<bean id="dsnBean" factory-bean="ColdboxFactory" factory-method="getDatasource">

<constructor-arg name="alias">

<value>DBDetails</value>

</constructor-arg>

</bean>





<!--DAO/Gateways-->

<bean id="schoolDAO" class="model.dao.schoolDAO">

<!--DAO Bean needs DNS to be injected from DNS Bean!-->

<constructor-arg name="dsnBean">

<ref bean="dsnBean" />

</constructor-arg>

</bean>

below is my config for the datasource, however it makes no different what I put in here as it never gets passed.

have i missed something with the upgrade?
//Datasources

      datasources = {

         DBDetails = {name="xxDS", dbType="mssql", username="xxx", password="xxx"}

      };


when I use the bean in my models I get empty strings
Link | Top | Bottom
lmajano
Veteran Master

Joined: 01/29/05
Posts: 1209
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/07/10 10:15 PM

Weird,

Can you do me a favor and dump the config settings and see what is there?

<cfdump var="#controller.getConfigSettings()#">

Do this in any handler or view. Check that the datasources are there correctly.
Luis Majano
Link | Top | Bottom
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/08/10 3:32 AM

Dump of controller.getConfigSettings() for the datasource shows below. ps I dumped on the default handler

DATASOURCES    

struct

DBDETAILS    

struct

DBTYPE [empty string]

NAME     rudifferentDS

PASSWORD    [empty string]

USERNAME    [empty string]

now in my config.cfc I have the following, where xxx has my username and password.
//Datasources

      datasources = {

         DBDetails = {name="rudifferentDS", dbType="mssql", username="sa", password="XXXXX"}

      };


I don't have any errors...

you can see the full dump here for the next few days... http://www.rudifferent.co.uk/index.cfm

thanks for the help
Link | Top | Bottom
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/08/10 3:35 AM

oops, I actually put the passwords in that one, I will change them, in the mean time can you just edit the post lmajano... to state xxx my mistake lol
Link | Top | Bottom
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/08/10 10:11 AM

any change you had a look at this code, do you think this is a bug or something I have missed? I have tested the code in the standard version of CB and changed the line back from coldbox.system.ioc.ColdboxFactory and it seems to work. so it looks like a M4 CB bug or something I maybe habe missed
Link | Top | Bottom
lmajano
Veteran Master

Joined: 01/29/05
Posts: 1209
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/08/10 10:49 AM

Thanks, this has been fixed on SVN.
Luis Majano
Link | Top | Bottom
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/08/10 11:26 AM

cool thanks for that, is this fix in the update?
Link | Top | Bottom
sparky300
Veteran Master

Joined: 11/21/08
Posts: 143
RE: ColdBox 3 M4 - ColdSpring Create Config Bean not working
02/14/10 10:49 AM

can anyone checkout your SVN for this build, can it be downloaded anywhere? whats your time scale on the next update on the site with the latest fixes?
Link | Top | Bottom

Galleon Forums V1.7.008 was created by Raymond Camden