If you look at the code in the generated proxy, what are the values it is using for the bean factory name and the scope? It sounds like these are not being set. You may want to try deleting it and the rerunning onApplicationStart() to see what it generates. If you had already created the proxy and onApplicationStart() ran, it's not going to regenerate the proxy again until the application timeout, which means any changes or tweaks you've made to the ColdSpring XML won't be used.
On 8/13/07, Daniel Schmid <[EMAIL PROTECTED]> wrote: > > I try to get my first remoteProxy out of coldspring running and get stuck > with > > "Sorry, a ColdSpring BeanFactory named was not found in scope. Please > make sure your bean factory is properly loaded. Perhapse your main > application is not running?" > > I know other had the same problems, I read > http://www.remotesynthesis.com/blog/index.cfm/2007/7/16/Some-Tips-on-Using-ColdSpring-Remoting > > and > http://www.remotesynthesis.com/blog/index.cfm/2007/7/20/Objects-and-Composition-Connecting-to-Flex > > > cfc's and configuration files are outside webroot and mapped > > My setup: > > [modell] > /mocca/{model} -> with a mapping in cf to '/mocca' > /mocca/config/services.xml > > CF8 in WEB-INF/flex/remoting- config.xml I set > <use-mappings>true</use-mappings> > > ColdSpring definition: > > <bean id="contactService_remote" class=" > coldspring.aop.framework.RemoteFactoryBean"> > <property name="target"> > <ref bean="contactService" /> > </property> > <property name="serviceName"> > <value>contactServiceRemote</value> > </property> > <property name="beanFactoryName"> > <value>factory</value> > </property> > <property name="relativePath"> > <value>/mocca/contact</value> > </property> > <property name="remoteMethodNames"> > <value>get*</value> > </property> > </bean> > > > {webroot}/Application.cfc > {webroot}/index.cfm (with swf) > > In Application.cfc onApplicationStart: > > <!--- setup coldspring bean factory ---> > <cfset defaultProperties = structNew()/> > <cfset defaultProperties.dsn = 'mocca'/> > <cfset application.factory = createObject("component"," > coldspring.beans.DefaultXmlBeanFactory > ").init(defaultProperties=defaultProperties)/> > <cfset application.factory.loadBeansFromXmlFile > (expandPath("/mocca/app/config/services.xml"),true)/> > <cfset application.factory.getBean("contactService_remote") /> > > Than in Flex I call: > > <mx:RemoteObject id="contactService" destination="ColdFusion" source=" > mocca.contact.contactServiceRemote" fault="serverFault(event)"> > <mx:method name="getContacts" > result="getContactsRO_handler(event)" /> > </mx:RemoteObject> > > I provided a beanFactoryName 'factory', assigned the beanfactory under > this name to the application scope on start up, but it's till not available > in contactServiceRemote (which was generated nicely by coldspring during > application start. > > Thanks for hints, Daniel > > > >
