Upgrade to 2.0

77 views
Skip to first unread message

Scott Conklin

unread,
Jul 4, 2012, 11:40:02 AM7/4/12
to coldspri...@googlegroups.com
In my FW/1 application, I updated  CS  from 1.2 to 2.0 using the git master branch on github, restarted by CF service and got the following error.. 
(I thought i read somewhere that 2.0 is near release candidate.. was i mistaken? )

The containsBean function does not specify the same arguments or arguments in the same order in the coldspring.beans.DefaultXmlBeanFactory ColdFusion component and the coldspring.beans.BeanFactory ColdFusion interface.

A quick peek at the source code seems to indicate that it does not like the fact that the argument name  for the function contatinsBean has a different name in the CFC and CF Interface..i.e. 
"BeanName" vs "Name"  

Has anybody else seen this? 

I am running Adobe CF 9.01 on IIS 7.0 / Win 7 installation.

Mark Mandel

unread,
Jul 4, 2012, 5:54:18 PM7/4/12
to coldspri...@googlegroups.com
So in ColdSpring 2 there is no DefaultXmlBeanFactory, there is only an XmlBeanFactory.

Sounds like your mappings are a bit messed up maybe?

Mark


--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/2iF1ofGG8gAJ.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.



--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

Scott Conklin

unread,
Jul 5, 2012, 12:35:38 PM7/5/12
to coldspri...@googlegroups.com
ah! looks like i did not clear my directory before copying in CS 2.0. Thanks!! 
that solved that issue but now i have a new one... I looked at the quickstart tutorial and see that the new method is executed like so

<cfscript>
        import coldspring.beans.xml.XmlBeanFactory;
        beanFactory = new XmlBeanFactory(expandPath('config/coldspring.xml'));
</cfscript>

but loadBeans is no longer found? 
what is the new way of the equivalent of passing in a config object to the init method like i had been doing for so long:

application.beanfactory = CreateObject('component', 'coldspring.beans.xml.XmlBeanFactory').init(defaultProperties=variables.Config);
application.beanFactory.loadBeans(expandPath('./assets/config/coldspring.xml'));






On Wednesday, July 4, 2012 4:54:18 PM UTC-5, Mark Mandel wrote:
So in ColdSpring 2 there is no DefaultXmlBeanFactory, there is only an XmlBeanFactory.

Sounds like your mappings are a bit messed up maybe?

Mark

On Thu, Jul 5, 2012 at 1:40 AM, Scott Conklin <scon...@dynaprice.net> wrote:
In my FW/1 application, I updated  CS  from 1.2 to 2.0 using the git master branch on github, restarted by CF service and got the following error.. 
(I thought i read somewhere that 2.0 is near release candidate.. was i mistaken? )

The containsBean function does not specify the same arguments or arguments in the same order in the coldspring.beans.DefaultXmlBeanFactory ColdFusion component and the coldspring.beans.BeanFactory ColdFusion interface.

A quick peek at the source code seems to indicate that it does not like the fact that the argument name  for the function contatinsBean has a different name in the CFC and CF Interface..i.e. 
"BeanName" vs "Name"  

Has anybody else seen this? 

I am running Adobe CF 9.01 on IIS 7.0 / Win 7 installation.

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/2iF1ofGG8gAJ.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to coldspring-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.

Scott Conklin

unread,
Jul 5, 2012, 12:42:00 PM7/5/12
to coldspri...@googlegroups.com
just saw this....
sorry to post without first  RTFM....

Scott Conklin

unread,
Jul 5, 2012, 1:43:27 PM7/5/12
to coldspri...@googlegroups.com
Ok, i read through the migration guide and got my application to work, but not before having to make the following change to e bean that is 'Factory Aware'

I implemented the coldspring.beans.factory.BeanFactoryAware interface as per the docs and because of this i had to explicitly add the setbeanFactory method to my cfc

public void function setBeanFactory  (required coldspring.beans.BeanFactory beanFactory) output="false" {
variables.beanFactory =arguments.beanFactory;
}

where before i was able to just add the beanfactory as propertly

 property name='BeanFactory' type=' coldspring.beans.BeanFactory;

Can i no longer do this now that it is done via an interface? 

Brian Kotek

unread,
Jul 5, 2012, 3:29:03 PM7/5/12
to coldspri...@googlegroups.com
As far as I know, you were always supposed to declare a setter for this. If it worked with only a proprety and not the setter, my guess is that was an oversight in the 1.x version? That said, it seems like allowing it to work just on a public property with the right name shouldn't really be a problem, but Mark should be able to say for sure.



To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/F8WuwpMGBhwJ.

To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.

Mark Mandel

unread,
Jul 6, 2012, 2:27:14 AM7/6/12
to coldspri...@googlegroups.com
Yeah, unfortunately CF requires the concrete method be there, instead of just the public property.

Mark

To view this discussion on the web visit https://groups.google.com/d/msg/coldspring-users/-/F8WuwpMGBhwJ.

To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.
Reply all
Reply to author
Forward
0 new messages