Flex/Coldspring Error?
Posted by Stephen Weyrick | Tags: coldfusion , flex , coldspring
Over this past week, I started using Coldspring in an application that I have been building at work; I love the fact that I don't have to call createobject in every function, and it should save me mountains of time once I become used to writing the coldspring config files. However, I ran into a small problem yesterday that I haven't been able to figure out.
The problem occurs when I call remote objects in Flex, and the onApplicationStart method hasn't previously been called from ColdFusion. If I run a test page that calls the cfcs, the results are returned without a problem, and I can actually run the application in Flex just fine after the onApplicationStart method has been called once from ColdFusion. Has anyone else run into this problem? I can't seem to find any useful information after googling this morning.
Error:
Event handler exception. An exception occurred when invoking a event handler method from Application.cfc. The method name is: onApplicationStart.
<cffunction name="onApplicationStart" returnType="boolean" output="false">
<cfset var properties = structNew() />
<cfset coldspringConfig = 'coldspring.xml' />
<cfset application.beanFactory=
createObject('component', 'coldspring.beans.DefaultXmlBeanFactory').init() />
<cfset application.beanFactory=
CreateObject('component', 'coldspring.beans.DefaultXmlBeanFactory').
init(defaultProperties=properties) />
<cfset application.beanFactory.loadBeans(coldspringConfig) />
<cfreturn true>
</cffunction>
7 responses so far ↓
Leave a Comment