coldspring.xml and reactor - noobe question

5 views
Skip to first unread message

Sam

unread,
Nov 4, 2009, 2:31:43 PM11/4/09
to model-glue
I've googled and searched the model-glue group, finding similar
problems, but no solution is working for me yet. I'm currently
getting the following:
Bean creation exception during init() of reactor.reactorFactory
The PATHTOCONFIGXML parameter to the init function is required but was
not passed in.:

ColdSpring.xml:
<beans>
<bean id="modelglue.modelGlueConfiguration"
class="ModelGlue.gesture.configuration.ModelGlueConfiguration">
<property name="reload"><value>true</value></property>
<property name="debug"><value>true</value></property>
<property name="eventValue"><value>event</value></property>
<property name="defaultEvent"><value>page.index</value></
property>
<property name="missingEvent"><value>page.missing</value></
property>
<property name="defaultExceptionHandler"><value>page.error</
value></property>
<property name="reloadPassword"><value>true</value></property>
<property name="reloadKey"><value>init</value></property>
<property name="configurationPath"><value>config/
ModelGlue.xml</value></property>
<property name="applicationMapping"><value>/ArtMG</value></
property>
<property name="viewMappings"><value>/ArtMG/views</value></
property>
<property name="helperMappings"><value>/ArtMG/helpers</value></
property>
<property name="generationEnabled"><value>true</value></
property>
<property name="defaultCacheTimeout"><value>60</value></
property>
<property name="rescaffold"><value>true</value></property>
<property name="generatedViewMapping"><value>views</value></
property>
<property name="scaffoldPath"><value>config/scaffolds/
Scaffolds.xml</value></property>
<property
name="defaultScaffolds"><value>list,edit,view,commit,delete</value></
property>
</bean>
<bean id="modelglue.applicationConfiguration"
class="ModelGlue.Bean.CommonBeans.SimpleConfig">
<property name="config"><map><entry
key="myDatasource"><value>myDatasource</value></entry></map></
property>
</bean>
<alias alias="ormService" name="ormService.Reactor" />

<bean id="reactorConfiguration" class="reactor.config.config">
<constructor-arg name="pathToConfigXML"><value>/ArtMG/config/reactor/
Reactor.xml</value></constructor-arg>
<property name="project"><value>ArtMG</value></property>
<property name="dsn"><value>myDatasource</value></property>
<property name="type"><value>mssql</value></property>
<property name="mapping"><value>/ArtMG/model/data/reactor</value></
property>
<property name="mode"><value>development</value></property>
</bean>

</beans>

Doug Boude

unread,
Nov 5, 2009, 5:17:21 AM11/5/09
to model...@googlegroups.com
Hi Sam. It looks to me like you're missing a couple of entries for Reactor. I'm pasting in the relevant coldspring entries from a working app of mine where I use Reactor for you to compare and try. Also, you seem to have a floating 'alias' tag in yours that doesn't look right to me. Here's my working settings:

<bean id="reactorConfiguration" class="reactor.config.config">
<constructor-arg name="pathToConfigXml"><value>/szvideo/config/Reactor.xml</value></constructor-arg>
<property name="project"><value>szvideo</value></property>
<property name="dsn"><value>sushimiles</value></property>
<property name="type"><value>mssql</value></property>
<property name="mapping"><value>/szvideo/model/reactor</value></property>
<property name="mode"><value>development</value></property>
</bean>
<bean id="ormAdapter" class="modelGlue.unity.orm.reactorAdapter">
<constructor-arg name="framework"><ref bean="modelGlue" /></constructor-arg>
</bean>
<bean id="ormService" class="reactor.reactorFactory">
<constructor-arg name="configuration"><ref bean="reactorConfiguration" /></constructor-arg>
</bean>
<bean id="modelGlueConfiguration" class="modelglue.unity.framework.ModelGlueConfiguration">
<!-- Be sure to change reload to false when you go to production! -->
<property name="reload"><value>true</value></property>
<!-- Rescaffold is overridden by reload - if reload is false
rescaffold's setting doesn't matter -->
<property name="rescaffold"><value>false</value></property>
<!-- Be sure to change debug to false when you go to production! -->
<property name="debug"><value>false</value></property>
<property name="defaultEvent"><value>index</value></property>
<property name="reloadPassword"><value>true</value></property>
<property name="viewMappings"><value>/szVideo/views</value></property>
<property name="generatedViewMapping"><value>/szVideo/views</value></property>
<property name="configurationPath"><value>config/ModelGlue.xml.cfm</value></property>
<property name="scaffoldPath"><value>config/Scaffolds.xml</value></property>
<property name="statePrecedence"><value>form</value></property>
<property name="reloadKey"><value>init</value></property>
<property name="eventValue"><value>event</value></property>
<property name="defaultTemplate"><value>index.cfm</value></property>
<property name="defaultExceptionHandler"><value>exception</value></property>
<property name="defaultCacheTimeout"><value>5</value></property>
<property name="defaultScaffolds"><value>list,edit,view,save,delete</value></property>
</bean>


Doug Boude  :0)

Ezra Parker

unread,
Nov 5, 2009, 2:20:18 PM11/5/09
to model...@googlegroups.com
Hmm, I pasted Sam's config over the ColdSpring.xml of a brand-new MG
site (with the necessary config file and mapping directory for
Reactor), and it spun up just fine for me. Sam, can you confirm which
versions of the three frameworks (Model-Glue, ColdSpring and Reactor)
you are running?

@Doug, the <alias> tag Sam used is indeed a valid approach -- MG's
internal CS configuration defines an "ormService.Reactor" bean (the
Reactory factory), which can be referenced as simply "ormService" by
using the alias as Sam did. Although generic database messages and
scaffolding won't work without also adding an "ormAdapter" alias, if
someone isn't using these features and just needs the ORM factory
itself, then defining just the "ormService" alias is fine.

Assuming that one has an appropriate version of ColdSpring (I think
that the alias tag is supported as of version 1.2, but I could well be
mistaken), using the aliases allows for a bit less verbose
configuration.

--
Ezra Parker
Reply all
Reply to author
Forward
0 new messages