I created a new MG application using the modelglueapplicationtemplate.
I activated the Reactor code in ColdSpring.xml. Here is what
ColdSpring.xml looks like:
<beans>
<!-- This is your Model-Glue configuration -->
<bean id="modelglue.modelGlueConfiguration"
class="ModelGlue.gesture.configuration.ModelGlueConfiguration">
<!-- Be sure to change these to false when you go to production! -->
<property name="reload"><value>true</value></property>
<property name="debug"><value>true</value></property>
<!-- Name of the URL variable that states which event-handler to run -->
<property name="eventValue"><value>event</value></property>
<!-- Default event-handler -->
<property name="defaultEvent"><value>page.index</value></property>
<!-- Execute this event when the requested event is missing. Won't work
if generationEnabled=true and in development mode! -->
<property name="missingEvent"><value>page.missing</value></property>
<!-- Execute this event when an error occurs. -->
<property
name="defaultExceptionHandler"><value>page.error</value></property>
<!-- Controls reloading -->
<property name="reloadPassword"><value>true</value></property>
<property name="reloadKey"><value>init</value></property>
<!-- Where to find necessary files -->
<property
name="configurationPath"><value>config/ModelGlue.xml</value></property>
<property name="applicationMapping"><value>/testingapp</value></property>
<property name="viewMappings"><value>/testingapp/views</value></property>
<property
name="helperMappings"><value>/testingapp/helpers</value></property>
<!-- Generate unknown events when in development mode? (reload=false) -->
<property name="generationEnabled"><value>true</value></property>
<!-- Set the default cache timeout in seconds -->
<property name="defaultCacheTimeout"><value>60</value></property>
<!-- Scaffolding config -->
<!-- Turning this off will disable any scaffold generation. Turning this
on requires the reload setting above to also be on.-->
<property name="rescaffold"><value>true</value></property>
<!-- Where do you want generated views to be saved to? -->
<property name="generatedViewMapping"><value>views</value></property>
<!--This directory structure should already exists. ModelGlue will
create the Scaffolds.xml file and overwrite as needed.-->
<property
name="scaffoldPath"><value>config/scaffolds/Scaffolds.xml</value></property>
<!-- What scaffold generation patterns should ModelGlue use if you do
not specify in the <scaffold type=""> attribute? .-->
<property
name="defaultScaffolds"><value>list,edit,view,commit,delete</value></property>
<!-- See documentation or ModelGlueConfiguration.cfc for additional
options. -->
</bean>
<!--
If you need your own configuration values (datasource names, etc),
put them here.
See modelgluesamples/simpleconfiguration/controller/Controller for
an example of how to get to the values.
Advanced users who are used to ColdSpring will probably delete this
bean in favor of their own approach.
-->
<bean id="modelglue.applicationConfiguration"
class="ModelGlue.Bean.CommonBeans.SimpleConfig">
<property name="config">
<map>
<entry key="myDatasource"><value>sakila</value></entry>
</map>
</property>
</bean>
<!-- Put definitions for your own beans and services here -->
<!-- ORM Framework Configuration -->
<!--
The following explains how to connect Model-Glue to either the
Transfer or Reactor ORM frameworks.
If you've got the lastest (from CVS) version of ColdSpring, the
commented-out
code below will work.
Otherwise, do the following:
1. Choose whether to use Reactor or Transfer for this project
2. Open up /ModelGlue/unity/config/Configuration.xml
3. Uncomment the appropriate "To use xxxx as an ORM
Framework..." block below
4. Delete the <alias /> tags in the ORM block you uncommented
5. If using Reactor, copy/paste the beans named
"ormAdapter.Reactor" and
"ormService.Reactor" to this file (from
Configuration.xml) and remove
the ".Reactor" from their name attributes.
6. If using Transfer, copy/paste the beans named
"ormAdapter.Transfer" and
"ormService.Transfer" to this file (from
Configuration.xml) and remove
the ".Transfer" from their name attributes.
-->
<!--
Transfer:
<alias alias="ormAdapter" name="ormAdapter.Transfer" />
<alias alias="ormService" name="ormService.Transfer" />
<bean id="transferConfiguration" class="transfer.com.config.Configuration">
<constructor-arg
name="datasourcePath"><value>/testingapp/config/transfer/Datasource.xml</value></constructor-arg>
<constructor-arg
name="configPath"><value>/testingapp/config/transfer/Transfer.xml</value></constructor-arg>
<constructor-arg
name="definitionPath"><value>/testingapp/model/data/transfer</value></constructor-arg>
</bean>
Reactor:
-->
<alias alias="ormAdapter" name="ormAdapter.Reactor" />
<alias alias="ormService" name="ormService.Reactor" />
<bean id="reactorConfiguration" class="reactor.config.config">
<constructor-arg
name="pathToConfigXml"><value>/testingapp/config/reactor/Reactor.xml</value></constructor-arg>
<property name="project"><value>testingapp</value></property>
<property name="dsn"><value>sakila</value></property>
<property name="type"><value>mysql</value></property>
<property
name="mapping"><value>/testingapp/model/data/reactor</value></property>
<property name="mode"><value>development</value></property>
</bean>
</beans>
Here is the error message that I get when I try to reload the application:
The setBeanFactory method was not found.
Either there are no methods with the specified method name and argument
types or the setBeanFactory method is overloaded with argument types
that ColdFusion cannot decipher reliably. ColdFusion found 0 methods
that match the provided arguments. If this is a Java object and you
verified that the method exists, use the javacast function to reduce
ambiguity.
The error occurred in
/Library/WebServer/Documents/reactor/reactorFactory.cfc: line 135
Called from
/Library/WebServer/Documents/coldspring/beans/DefaultXmlBeanFactory.cfc:
line 902
Called from
/Library/WebServer/Documents/coldspring/beans/DefaultXmlBeanFactory.cfc:
line 632
Called from
/Library/WebServer/Documents/ModelGlue/gesture/externaladapters/ioc/ColdSpringAdapter.cfc:
line 22
Called from
/Library/WebServer/Documents/ModelGlue/gesture/ModelGlue.cfc: line 195
Called from
/Library/WebServer/Documents/ModelGlue/gesture/modules/orm/controller/GenericORMController.cfc:
line 27
Called from
/Library/WebServer/Documents/ModelGlue/gesture/eventrequest/EventContext.cfc:
line 298
Called from
/Library/WebServer/Documents/ModelGlue/gesture/eventrequest/EventContext.cfc:
line 225
Called from
/Library/WebServer/Documents/ModelGlue/gesture/eventrequest/phase/Population.cfc:
line 23
Called from
/Library/WebServer/Documents/ModelGlue/gesture/eventrequest/EventContext.cfc:
line 155
Called from
/Library/WebServer/Documents/ModelGlue/gesture/ModelGlue.cfc: line 215
Called from
/Library/WebServer/Documents/ModelGlue/gesture/ModelGlue.cfm: line 58
Called from /Library/WebServer/Documents/testingapp/index.cfm: line 50
133 : <cfargument name="factory" type="coldspring.beans.BeanFactory"
required="true" />
134 : <cfset variables.BeanFactory = arguments.factory />
135 : <cfset getObjectFactory().setBeanFactory( arguments.factory )>
136 : </cffunction>
137 :
What is causing the setBeanFactory error message?
--
Lola J. Lee Beno
LinkedIn: http://www.linkedin.com/in/lolajleebeno
Facebook: http://www.facebook.com/profile.php?id=714355583
Blog: http://www.lolajl.net/blog/
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en