Dec 27 2006

Model-Glue 2.0 ("Unity") Beta 2 Update

Posted by Joe Rinehart at 8:12 AM
15 comments
- Categories: Model-Glue

I'm making progress towards a second beta of Model-Glue 2.0. Most of the tickets are closed, and I'm working on documentation.

Currently, I hope to release the second Beta in the first week of the new year.

This next bit is important.

If you've developed applications using Beta 1 that use ORM services, and you get the latest code from SVN, your application will crash.

This is because I've moved a few bits of Reactor-specific ORM configuration out of the core files and into the application's ColdSpring.xml file.

To get things running again, add the following to your ColdSpring.xml file. This is part of what I'm working on documenting (in a new help doc entitled "Using Model-Glue with the Reactor ORM Framework").

<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>

Comments

Damon

Damon wrote on 12/27/06 12:09 PM

You should put this info into Trac with the revision info.
Sean Corfield

Sean Corfield wrote on 12/27/06 1:12 PM

Thanx. This will make it easier to use Transfer as the ORM with Model-Glue.

We could make it easier still if ColdSpring supported aliases :)
Sal

Sal wrote on 12/27/06 1:29 PM

Joe,
Once I updated my revision from SVN, and added the above code you advised, I got an error...
Element _CURRENTEVENTHANDLER is undefined in VARIABLES.

In one of my controllers I use aguments.event.getEventHandlerName();
and thats where it's breaking...

?? any suggestions...?

cheers.
Sean Corfield

Sean Corfield wrote on 12/27/06 1:50 PM

Yeah, I got this error too and just put it down to bleeding edge instability and backed off a few versions. That's the price of doing business on the edge ;)

I had a version of Fusebox 5.1 checked into SVN that had a pretty serious bug in it for about a week before I noticed - that's why framework authors make official &quot;stable&quot; public releases as well as making the SVN open to one and all...
Sal

Sal wrote on 12/27/06 2:05 PM

Nah totally understood, I was just letting Joe know about that. thought perhaps it'd be a quick fix...
:-) Glad to hear Im not the only one experiencing this exact issue, well not glad but... ya get what Im saying...
O?uz Demirkap?

O?uz Demirkap? wrote on 12/27/06 6:56 PM

Hi Joe,

Are there any update for &quot;headstart&quot; also? :)
Joe Rinehart

Joe Rinehart wrote on 12/28/06 8:51 AM

Hey folks,

I'll check out what's causing that error - can you describe the conditions under which you hit it? Legacy application or fresh MG2 app?

Concerning headstart and other &quot;actionpacks,&quot; they're going to be the main focus of beta 2 -&gt; 2.0 release development. Not necessarily development of actual actionpacks, but somewhat formalizing the definition and some infrastructure work.

-Joe
Sean Corfield

Sean Corfield wrote on 12/28/06 2:48 PM

For me it was an existing, working Model-Glue 2.0 application that worked a few versions of MG back. I just ran an update of MG from SVN and got that error (even after restarting the server). It's on the work system so I'll look at it again when I get back on the 2nd (yes, Adobe is on vacation for a week and Christmas!).
Sal

Sal wrote on 12/28/06 2:56 PM

Joe,

Well the condition I'm using my arguments.event.getEventHandlerName(); is in a method triggered by the onRequestStart listener. What this method does is checks a specific event for an authorized user session and addResults() from there... And yes it's a fresh MG:U app, if by fresh you mean still in development...

-Sal
Joe Rinehart

Joe Rinehart wrote on 01/02/07 1:14 PM

Sal, Sean:

I fixed this problem during my lunch break today. It's actually existed for a while :)

Details at http://trac.model-glue.com/model-glue/ticket/239#preview .

-Joe
Peter J. Farrell

Peter J. Farrell wrote on 01/02/07 1:58 PM

FYI, I know Sean already knows this, but wanted to point out on the comment thread the ColdSpring now supports Aliases (since Chris Scott just added them just days after this post).
Sean Corfield

Sean Corfield wrote on 01/03/07 2:24 AM

Thanx Joe - that fix solved my basic problem but then I ran into the _getTO() in ReactorORMController.cfc (74) error trying to use Transfer. I've patched my copy (and we've discussed this on IM and email so I'm posting this just for anyone else trying to use Transfer with MG).

Thanx to Chris Scott for the alias fix. Very sweet. Already updated my local ColdSpring and discussed with Joe ways to make this ORM integration smoother using aliases.

Also (while I'm at it) thanx to Jared Rypka-Hauer for the new import tag in ColdSpring. That's already made my code cleaner (I have *lots* of ColdSpring.xml files!).
Sal

Sal wrote on 01/05/07 3:58 PM

thanks Joe, yes that did seem to work... No errors on this end. :)
But I have one question... Anyone have any recent threads/ posts / docs on using the Transfer ORM with MG2, and how to set it up, with this new update of the cs.xml and the aliases the CS community has been speaking of?

cheers :)

ahh yes, and I'm excited for the release of MG 2.0, I had a previous problem that needed to be posted on trac, I forget what it was, but I'll get back to it and see if it still persists...
I think I've emailed you before on it. But lemme get back to you on that, and if need be post it on trac.

Sal
Jeff Self

Jeff Self wrote on 04/12/07 2:24 PM

I've created an app to test out scaffolding. Its called blog and I've set up a database with a table called posts. In the table are two fields, id and title. I've created my data source for it in CF Admin and I've got mappings set up for Model Glue, ColdSpring, and Reactor. I've added the code you mentioned to my ColdSpring.xml file and created a scaffold in my event-handlers with:
&lt;scaffold object=&quot;posts&quot; /&gt;

But when I try to run the application, I get the following error:

Bean creation exception during init() of ModelGlue.unity.eventhandler.EventHandlerFactory
Bean creation exception during init() of ModelGlue.unity.orm.ReactorAdapter:Element DESCRIPTION is undefined in CFCATCH.:

The error occurred in C:coldspringeansDefaultXmlBeanFactory.cfc: line 539
Called from C:coldspringeansDefaultXmlBeanFactory.cfc: line 332
Called from C:ModelGlueunityloaderXmlConfigurationLoader.cfc: line 16
Called from C:ModelGlueunityloaderXmlConfigurationLoader.cfc: line 317
Called from C:ModelGlueunityloaderXmlConfigurationLoader.cfc: line 47
Called from C:ModelGlueunityloaderFrameworkLoader.cfc: line 60
Called from C:ModelGlueunityModelGlue.cfm: line 37
Called from C:JRun4serverscfusioncfusion-earcfusion-warlogindex.cfm: line 72

537 :                         &lt;cfthrow type=&quot;coldspring.beanCreationException&quot;
538 :                            message=&quot;Bean creation exception during init() of #beanDef.getBeanClass()#&quot;
539 :                            detail=&quot;#cfcatch.message#:#cfcatch.detail#&quot;&gt;
540 :                      &lt;/cfcatch&gt;
541 :                   &lt;/cftry&gt;

What's going on?
raisch

raisch wrote on 05/11/07 12:23 PM

Out of the box install of current stable versions of Coldspring and Reactor with current Beta 2.0 release fails with the same error. What's the fix?

Write your comment



(it will not be displayed)