Sign Doug's SOTR Petition!

Sign Doug's petition to his boss and help send him to Scotch on the Rocks in 2012!
Recent Entries
Contact Doug!
Learn About Doug!
View Doug Boude's online resume
updated 11/18/2009

View Doug Boude's profile on LinkedIn
Link to me!

Follow Doug Boude on Twitter
Follow me!

Be Doug's friend on Facebook
Befriend me!
(I promise not to follow you home)
OO Lexicon
Chat with Doug!
NO MORE CAREER
POLITICIANS!
Get Out Of Our House: Replacing congress with TRUE citizens!
You may also be interested in...
Web Hosting
best web hosting - top web hosting sites, thetop10bestwebhosting.com

Czech your Page Rank!
Check Page Rank of any web site pages instantly:
This free page rank checking tool is powered by Page Rank Checker service
Surf's Up!
Visit Egosurf.org and massage YOUR web ego!
My Score: 9,001
Doug's Books

Read (and recommend)

  • Men are from Mars, Women are from Venus
  • The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations
  • Blink: The Power of Thinking Without Thinking
  • Head First Design Patterns
  • Transact-SQL Programming
  • What's So Amazing About Grace?
  • Just So Stories (Rudyard Kipling collection)

Reading

  • Prayer: Does it Make Any Difference?
  • Data Mining (Practical Machine Learning Tools and Techniques)
<< May, 2009 >>
SMTWTFS
12
3456789
10111213141516
17181920212223
24252627282930
31
Search Blog

Recent Comments
Re: Basic Ajax Select List Filter in PHP (by opineemia at 2/02 8:47 PM)
Re: PHP vs COLDFUSION (by dougboude at 1/24 9:47 AM)
Re: PHP vs COLDFUSION (by WhatTheHeck at 1/23 7:03 PM)
Re: Recursive Functions in ColdFusion (by Marty McGee at 1/22 1:01 PM)
Re: SQL Forward Engineering with Visio 2003 Professional (by Rama at 1/10 11:05 AM)
Re: PHP Export to Excel Snippet (by rasha at 1/10 1:55 AM)
Re: Fredrick "French" Fry (by Picky eater at 1/09 2:21 PM)
Re: Disappearing IE Popup Window During Save/Open Dialog (by Vivekanand at 1/06 12:51 AM)
Re: Just What IS a 'Service Layer', Anyway? (by Ashishkumar Haldar at 1/05 7:49 AM)
Re: Viewing Option Text (in IE7) that's Wider than the Select List (by ranjit sachin at 12/20 6:22 AM)
Re: Recursive Functions in ColdFusion (by Jason at 12/15 12:13 PM)
Re: Viewing Option Text (in IE7) that's Wider than the Select List (by kt at 12/08 3:47 AM)
Re: PayPal IPN Coldfusion CFC (by Guest at 11/28 6:11 PM)
Re: SQL Forward Engineering with Visio 2003 Professional (by freddy villamil at 11/09 2:49 PM)
Re: Finally Found a Use for CFTHREAD (by criclebrava at 11/09 1:23 PM)
Re: Finally Found a Use for CFTHREAD (by assisisowsfub at 11/07 10:37 PM)
Re: IRRITATING CF QUERY ERROR AND SOLUTION (by dougboude at 10/10 10:48 AM)
Re: Using Google as your CF Mail Server (by hlharkins at 10/09 10:24 AM)
Re: IRRITATING CF QUERY ERROR AND SOLUTION (by Peter Boughton at 10/07 3:15 PM)
Re: My Thoughts on the Current Presidential Contenders (by dougboude at 9/23 12:21 PM)
Categories
Archives
Photo Albums
Funnies (5)
Family (3)
RSS

Powered by
BlogCFM v1.11

12 December 2007
Model-Glue Ambiguous Error Matrix
As any user of Model-Glue can attest to, there are often times when you get the ol' "OOPS!" message and it doesn't give you much of a clue as to what the REAL issue is. Well, in order to help myself save time during future development and decipher these rather vague and even misleading types of errors, I've begun keeping track of them. I capture the error itself, what I found the TRUE cause to be, and what I did to rectify it. I hope to one day turn the matrix into more of a Model-Glue knowledgebase of sorts, but for now here it is in its basic state, in hopes that it may help someone else save a little hair pulling.

Bear in mind that since the errors I encounter are generated by my own code, some of the details will be reflective of that code. Just look past code specifics and into the heart of the matter in order to find what, within your OWN application, spawned your non-informative Model-Glue error.

May I also encourage all of you Model-Glue developers to do a similar thing as you encounter such ambiguous and frustrating errors. If you'll forward those to me (dougboude att geemale dote calm) along with a cause and fix, I'll gladly add them for the benefit of the community!

Without further adieux, my "Ambiguous Model-Glue Error Matrix" as it currently exists:


Error TextCauseFix

Oops!

Message An error occured while Searching an XML document.

Detail Empty expression!

Extended Info Tag Context C:\ColdFusion8\wwwroot\reactor\core\objectTranslator.cfc (144) C:\ColdFusion8\wwwroot\reactor\core\objectTranslator.cfc (159) C:\ColdFusion8\wwwroot\reactor\core\objectTranslator.cfc (159) C:\ColdFusion8\wwwroot\reactor\core\objectTranslator.cfc (99) C:\ColdFusion8\wwwroot\reactor\core\objectFactory.cfc (214) C:\ColdFusion8\wwwroot\reactor\reactorFactory.cfc (80) C:\ColdFusion8\wwwroot\ModelGlue\unity\orm\ReactorAdapter.cfc (57) C:\ColdFusion8\wwwroot\ModelGlue\unity\controller\GenericORMController.cfc (113) C:\ColdFusion8\wwwroot\ModelGlue\unity\listener\Listener.cfc (26) C:\ColdFusion8\wwwroot\ModelGlue\unity\eventrequest\MessageBroadcaster.cfc (32) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (359) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (332) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (306) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (264) C:\ColdFusion8\wwwroot\ModelGlue\unity\ModelGlue.cfm (104) C:\ColdFusion8\wwwroot\Housefacks\index.cfm (50)

Case sensitivity issue when using Reactor with or without a Modelglue Generic Event. The generic commit lists the value as "ImageRecord"; the actual object exists as "imageRecord".

Portion of the event calling the generic commit: 
<message name=""ModelGlue.genericCommit"">
    <argument name=""recordName"" value=""ImageRecord"" />
    <argument name=""criteria"" value=""imageID"" />
    <argument name=""object"" value=""image"" />
</message>

reactor.xml corresponding entry:
<object name="hf_image" alias="image">
    <hasOne name="Report">
        <relate from="ReportID" to="ReportID" />
    </hasOne> 
</object>

Make sure that case matches on every front. Generic event's recordname value; generic event's object value; alias name in reactor.xml for that object; actual name of record object generated by Reactor. Correct all case values, put Reactor into Development mode (within coldspring.xml), then re-execute the event that broadcasts the generic message, ensuring that "&init=true" is appended to the url. This will regenerate the object with the proper case and everything will be in sync again.
The web site you are accessing has experienced an unexpected error. Please contact the website administrator. The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request Model-Glue XML Problem: Bad tag. Every must have a NAME attribute.
The Event definition was malformed in the modelglue.xml file (or included xml file). Here is the offending event:
<event-handler name=""inspector.saveprefs"" access=""public"">
 
<broadcasts>
  <message name=""ModelGlue.genericCommit"">
   <argument name=""recordName"" value=""ClientRecord"" />
   <argument name=""criteria"" value=""ClientID"" />
   <argument name=""object"" value=""Client"" />
   <argument name=""validationName"" value=""PreferenceValidation"" />
  </message>
  <results>
   <result name=""commit"" do=""Inspector.ClientDetails"" redirect=""true"" append="""" preserveState=""false"" />
   <result name=""validationError"" do=""Inspector.ClientDetails"" redirect=""false"" append="""" preserveState=""true"" />
  </results>
  <views />
 </broadcasts>
</event-handler>

Ensure that the event definition is well formed. Even though from an XML standpoint it may be valid, it must also be valid from a Modelglue standpoint as well.

Oops!

Message The cause of this output exception was that: coldfusion.tagext.sql.QueryParamTag$InvalidDataException: Invalid data value [invite to parrty] exceeds maxlength setting [50]..

Detail

Extended Info

Tag Context C:\ColdFusion8\wwwroot\reactor\project\housefacks\Dao\ClientDao.cfc (694) C:\ColdFusion8\wwwroot\reactor\project\housefacks\Dao\ClientDao.cfc (13) C:\ColdFusion8\wwwroot\reactor\base\abstractRecord.cfc (148) C:\ColdFusion8\wwwroot\reactor\base\abstractRecord.cfc (139) C:\ColdFusion8\wwwroot\reactor\base\abstractRecord.cfc (129) C:\ColdFusion8\wwwroot\ModelGlue\unity\orm\ReactorAdapter.cfc (526) C:\ColdFusion8\wwwroot\ModelGlue\unity\controller\GenericORMController.cfc (139) C:\ColdFusion8\wwwroot\ModelGlue\unity\listener\Listener.cfc (26) C:\ColdFusion8\wwwroot\ModelGlue\unity\eventrequest\MessageBroadcaster.cfc (32) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (359) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (332) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (306) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (264) C:\ColdFusion8\wwwroot\ModelGlue\unity\ModelGlue.cfm (104) C:\ColdFusion8\wwwroot\Housefacks\index.cfm (50)

Occurs during attempted insert/update/commit, when the value of submitted form field contains more characters than the table field allows. This entry present because it CAN occur even when invoking Reactor's auto-validation. The reason this error could be seen WITH validation in place is due to the finicky nature of Reactor and how and when it regenerates its base objects. If the base object was not regenerated after the table had been modified, then no validation exists for any new fields that were added and we get this mostly untrapped error. Solution:
  • make sure reactor is in Development mode.
  • reinit the app while still in dev mode, walk through the portion of your app that performs validation
  • switch back to production mode for reactor
  • reinit the app

Oops!

Message Routines cannot be declared more than once.

Detail The routine setState has been declared twice in the same file. The CFML compiler was processing: A cffunction tag beginning on line 395, column 10. Extended Info

Tag Context C:\ColdFusion8\wwwroot\reactor\project\housefacks\Record\UserRecord.cfc (395) C:\ColdFusion8\wwwroot\reactor\core\objectFactory.cfc (145) C:\ColdFusion8\wwwroot\reactor\reactorFactory.cfc (26) C:\ColdFusion8\wwwroot\Housefacks\model\Authentication.cfc (62) C:\ColdFusion8\wwwroot\Housefacks\controller\AuthenticationController.cfc (25) C:\ColdFusion8\wwwroot\ModelGlue\unity\listener\Listener.cfc (26) C:\ColdFusion8\wwwroot\ModelGlue\unity\eventrequest\MessageBroadcaster.cfc (32) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (359) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (332) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (306) C:\ColdFusion8\wwwroot\ModelGlue\unity\framework\ModelGlue.cfc (264) C:\ColdFusion8\wwwroot\ModelGlue\unity\ModelGlue.cfm (104) C:\ColdFusion8\wwwroot\Housefacks\index.cfm (50)

Added a relationship to Reactor.xml. Attempted to relate a User's state ID value to a record in the States table in order to be able to retrieve the state abbreviation as opposed to the state ID.
<object name="hf_User" alias="User">
    <hasMany name="Role">
        <link name="UserRole" />
    </hasMany>  
    <hasMany name="Report">
        <relate from="UserID" to="InspectorID" />
    </hasMany>
    <hasMany name="Client" >
        <relate from="UserID" to="UserID" />
    </hasMany>
    <hasMany name="Realtor">
        <relate from=""UserID"" to="UserID" />
    </hasMany>
    <hasOne name="membership">
        <relate from="membershipID" to="membershipID" />
    </hasOne>
    <hasOne name="State">
        <relate from="state" to="stateID" />
    </hasOne>
</object>

The PROBLEM is that User already has a field named "State", and since the States table is also called State, Reactor is attempting to create two methods with the identical name...one that would retrieve the value of the State FIELD, and one that would retrieve the State OBJECT. This violates the rules.
SOLUTION: Use the attribute "alias" within the hasOne or hasMany tag to alias the method that will be generated. Like so:
<hasOne name="State" alias="ST">
    <relate from="state" to="stateID" />
</hasOne>

An error occured while Parsing an XML document.

The element type "value" must be terminated by the matching end-tag "".

The error occurred in C:\ColdFusion8\wwwroot\coldspring\beans\DefaultXmlBeanFactory.cfc: line 87 Called from C:\ColdFusion8\wwwroot\coldspring\beans\DefaultXmlBeanFactory.cfc: line 63 Called from C:\ColdFusion8\wwwroot\ModelGlue\unity\ModelGlue.cfm: line 71 Called from C:\ColdFusion8\wwwroot\Housefacks\index.cfm: line 50 85 : 86:00:00 87 :

88 : 89:00:00
ID10T error. Accidentally erased part of a tag in Coldspring.xml
look at the change that was just made and correct the malformed tag. In this case, it was a property tag:
 
<property name="mode"><value>production/value></property>
 

Model-Glue: C:\ColdFusion8\wwwroot\catschedule\scheduler\config\security.xml isn't valid XML!

The error occurred in C:\ColdFusion8\wwwroot\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 76 Called from C:\ColdFusion8\wwwroot\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 99 Called from C:\ColdFusion8\wwwroot\ModelGlue\unity\loader\FrameworkLoader.cfc: line 98 Called from C:\ColdFusion8\wwwroot\ModelGlue\unity\ModelGlue.cfm: line 116 Called from C:\ColdFusion8\wwwroot\catschedule\scheduler\index.cfm: line 72

 
           74 : </p>
            <cfset cfg = xmlParse(cfg).xmlRoot />    
            75 :            <cfcatch>    
            76 :                    <cfthrow message="Model-Glue: #configurationPath# isn't valid XML!" />    
            77 :            </cfcatch>    
            78 :    </cftry>    
Mal-formed modelglue.xml (or included configuration xml file). If you've looked it over carefully and your tags are all balanced, you might try also verifying that you're using the same CASE for all tag names. XML is case sensitive, so "value" is not the same as "Value". It is recommended that you not make TOO many changes to your modelglue configuration file before testing it, otherwise tracking down the offending line may be a very frustrating and time consuming task.
Oops!   
   
Message    An error occured while Parsing an XML document.
Detail    The content of elements must consist of well-formed character data or markup.
Extended Info   
Tag Context    D:\web\housefacks.com\www\reactor\core\objectTranslator.cfc (91)
    D:\web\housefacks.com\www\reactor\core\objectFactory.cfc (214)
    D:\web\housefacks.com\www\reactor\reactorFactory.cfc (80)
    D:\web\ModelGlue\unity\orm\ReactorAdapter.cfc (271)
    D:\web\ModelGlue\unity\orm\ReactorAdapter.cfc (145)
    D:\web\ModelGlue\unity\orm\ReactorAdapter.cfc (250)
    D:\web\ModelGlue\unity\controller\GenericORMController.cfc (73)
    D:\web\ModelGlue\unity\listener\Listener.cfc (26)
    D:\web\ModelGlue\unity\eventrequest\MessageBroadcaster.cfc (32)
    D:\web\ModelGlue\unity\framework\ModelGlue.cfc (359)
    D:\web\ModelGlue\unity\framework\ModelGlue.cfc (332)
    D:\web\ModelGlue\unity\framework\ModelGlue.cfc (306)
    D:\web\ModelGlue\unity\framework\ModelGlue.cfc (264)
    D:\web\ModelGlue\unity\ModelGlue.cfm (104)
    D:\web\housefacks.com\www\index.cfm (50)
This error was thrown by Reactor when it attempted to XMLParse a dictionary file for a given table. What has probably happened is you are using SVN in your development cycle, and when you performed an update to the destination code, SVN did a kind of "merge" on one of your dictionary files and flubbed it all up for you, thinking it was helping. Because the merged file is now not valid XML, Reactor barfed on it. Replace the target/faulty dictionary file with what's in the repository rather than attempt to merge it.
Bean creation exception in model.client

Cannot declare local variable homehistory twice.:Local variables cannot have the same names as parameters or other local variables.:

Line: -1   The error occurred in C:\ColdFusion8\wwwroot\MyApp\coldspring\beans\BeanDefinition.cfc: line 400
Called from C:\ColdFusion8\wwwroot\MyApp\coldspring\beans\BeanDefinition.cfc: line 215
Called from C:\ColdFusion8\wwwroot\MyApp\coldspring\beans\DefaultXmlBeanFactory.cfc: line 566
Called from C:\ColdFusion8\wwwroot\MyApp\coldspring\beans\DefaultXmlBeanFactory.cfc: line 495
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 293
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 210
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 58
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\loader\XmlConfigurationLoader.cfc: line 74
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\loader\FrameworkLoader.cfc: line 73
Called from C:\ColdFusion8\wwwroot\MyApp\ModelGlue\unity\ModelGlue.cfm: line 94
Called from C:\ColdFusion8\wwwroot\MyApp\index.cfm: line 50

398 :                           <cfthrow type="coldspring.beanCreationException"
399 :                                   message="Bean creation exception in #getBeanClass()#"
400 :                                   detail="#cfcatch.message#:#cfcatch.detail#:#additionalInfo#">
401 :                   </cfcatch>
402 :           </cftry>
The model.client CFC had a local variable named the same as one of the arguments

<cfargument name="myVar"... />
<cfset var myVar = "foo" />
Rename either the local variable or the argument.



Posted by dougboude at 11:20 AM | PRINT THIS POST! |Link | 4 comments
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: Model-Glue Ambiguous Error Matrix
I would like to say that in future don't use Model-Glue. Have you checked ColdBox, it really rocks in every aspect.
Posted by Sam on December 12, 2007 at 12:50 PM

Re: Model-Glue Ambiguous Error Matrix
Just for the record, I don't advocate dissing one framework over another. Because I like Chevy and you like Ford, that doesn't make one good and the other bad. What I have always advocated is, if you're in the market for a framework, then do what we ALL do when buying a car: test drive a few! Architect a very small app, perhaps something that does nothing more than load some dynamic navigation and allows for style sheet selection on the fly, and build it with all of the frameworks you are considering. You will see very quickly which one is the perfect fit for your particular coding style and way of thinking. That is what I did, and that is why I use Model-Glue almost exclusively now. Not saying "don't use Coldbox", but until you've test driven a framework yourself, keep an open mind to it. Just my two cents.
Posted by dougboude on December 12, 2007 at 1:02 PM

Re: Model-Glue Ambiguous Error Matrix
Nice list, thankfully I haven't ran into too many of those exceptions in my development trials. One thing that I wish MG debugging provided in the case of a malformed config files, would be to list the lines or elements that were incorrect\malformed\etc. I don't know if there exists such capabilities, but it would be much nicer to see the general area of where the xml was wrong vs. having to go over it with a fine tooth comb.
Posted by JAlpino on December 12, 2007 at 1:25 PM

Re: Model-Glue Ambiguous Error Matrix
Hey folks,

Wasn't quite sure what to make of this post...in the end, I think it's a heck of a good resource. These are actually exceptions I run into pretty frequently...the part that got me is that only one of them is actually an exception from within Model-Glue: where it tells you your XML didn't have a required attribute....and I agree with JAlpino that it might be nice to show you the offending line of XML. Using the DTD, which is part of the distro, will save you from this.

@Sam - Nice blanket statement with zero logic.
Posted by Joe Rinehart on May 3, 2008 at 12:08 PM

Name:   Required
Email:   Required your email address will not be publicly displayed.

Want to receive notifications when new comments are added? Login/Register for an account.

Time to take the Turing Test!!!

Nine plus Nineteen equals
Type in the answer to the question you see above:

Your comment:

Sorry, no HTML allowed!