objectTranslator.cfc throwing error at line 149

0 views
Skip to first unread message

Chuck Savage

unread,
Dec 17, 2009, 6:05:32 PM12/17/09
to Reactor
I'm a bit lost on what to do, I'm trying to make changes to a record,
and I keep getting this error.

Message An error occured while Searching an XML document.
Detail Empty expression!
Extended Info
Tag Context C:\Websites\157900dq4\Frameworks\Reactor\reactor\core
\objectTranslator.cfc (149)
C:\Websites\157900dq4\Frameworks\Reactor\reactor\core
\objectTranslator.cfc (164)
C:\Websites\157900dq4\Frameworks\Reactor\reactor\core
\objectTranslator.cfc (164)
C:\Websites\157900dq4\Frameworks\Reactor\reactor\core
\objectTranslator.cfc (101)
C:\Websites\157900dq4\Frameworks\Reactor\reactor\core
\objectFactory.cfc (291)
C:\Websites\157900dq4\Frameworks\Reactor\reactor\reactorFactory.cfc
(90)
C:\Websites\157900dq4\Frameworks\ModelGlue\unity\orm
\ReactorAdapter.cfc (35)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\modules\orm
\controller\GenericORMController.cfc (143)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\eventrequest
\EventContext.cfc (298)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\eventrequest
\EventContext.cfc (225)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\eventrequest\phase
\Invocation.cfc (62)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\eventrequest
\EventContext.cfc (155)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\ModelGlue.cfc (215)
C:\Websites\157900dq4\Frameworks\ModelGlue\gesture\ModelGlue.cfm (58)
C:\Websites\157900dq4\mg\index.cfm (49)

I've un-commented the try-catch block, and seen that
arguments.pathToNode is an empty string as the error says, but other
than that don't know how to interpret the error or a fix for it. I
deleted the generated xml file, but that doesn't seem to help.

Chuck Savage

unread,
Dec 17, 2009, 7:05:11 PM12/17/09
to Reactor
Ended up putting a try/catch around the recursion paramNode calls in objectTranslator.cfc, here's the code.  So far this is working, let me know if there is a better solution.

<cftry>
<cfset paramNode(arguments.xml, parentNodePath) />

<!--- create the node --->
<cfset node = XMLElemNew(arguments.xml, ListLast(arguments.pathToNode, "/")) />

<!--- if a value has been provided, set it. --->
<cfif Len(arguments.value)>
  <cfset node.XmlText = arguments.value />
</cfif>

<!--- get the parent Node --->
<cfset parentNode = XmlSearch(arguments.xml, parentNodePath) />
<cfset parentNode = parentNode[1] />

<!--- add the new node to its parent --->
<cfset ArrayAppend(parentNode.XmlChildren, node) />
<cfcatch type="any"></cfcatch>
</cftry>

Tom Chiverton

unread,
Dec 18, 2009, 6:53:41 AM12/18/09
to reacto...@googlegroups.com
On Friday 18 Dec 2009, Chuck Savage wrote:
> Ended up putting a try/catch around the recursion paramNode calls in
> objectTranslator.cfc, here's the code. So far this is working, let me know
> if there is a better solution.

Could you post the XML it was choking on ?

--

Tom Chiverton
Developer

Tom.Ch...@halliwells.com
3 Hardman Square, Manchester, M3 3EB

****************************************************

This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit
www.Halliwells.com.

Chuck Savage

unread,
Dec 18, 2009, 11:24:24 AM12/18/09
to reacto...@googlegroups.com
It kept coming back on user id for key field, but I couldn't figure it more than that.

<?xml version="1.0" encoding="UTF-8"?>
    <user>
        <id>
            <label>id</label>
            <comment/>
            <maxlength>0</maxlength>
            <scale>0</scale>
            <notProvided>The id field is required but was not provided.</notProvided>
            <invalidType>The id field does not contain valid data.  This field must be a numeric value.</invalidType>
        </id>
        <username>
            <label>username</label>
            <comment/>
            <maxlength>20</maxlength>
            <scale>0</scale>
            <notProvided>The username field is required but was not provided.</notProvided>
            <invalidType>The username field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The username field is too long.  This field must be no more than 20 bytes long.</invalidLength>
        </username>
        <password>
            <label>password</label>
            <comment/>
            <maxlength>32</maxlength>
            <scale>0</scale>
            <notProvided>The password field is required but was not provided.</notProvided>
            <invalidType>The password field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The password field is too long.  This field must be no more than 32 bytes long.</invalidLength>
        </password>
        <name>
            <label>name</label>
            <comment/>
            <maxlength>55</maxlength>
            <scale>0</scale>
            <notProvided>The name field is required but was not provided.</notProvided>
            <invalidType>The name field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The name field is too long.  This field must be no more than 55 bytes long.</invalidLength>
        </name>
        <roles>
            <label>roles</label>
            <comment/>
            <maxlength>255</maxlength>
            <scale>0</scale>
            <notProvided>The roles field is required but was not provided.</notProvided>
            <invalidType>The roles field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The roles field is too long.  This field must be no more than 255 bytes long.</invalidLength>
        </roles>
        <email>
            <label>email</label>
            <comment/>
            <maxlength>75</maxlength>
            <scale>0</scale>
            <notProvided>The email field is required but was not provided.</notProvided>
            <invalidType>The email field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The email field is too long.  This field must be no more than 75 bytes long.</invalidLength>
        </email>
        <comment>
            <label>comment</label>
            <comment/>
            <maxlength>255</maxlength>
            <scale>0</scale>
            <invalidType>The comment field does not contain valid data.  This field must be a string value.</invalidType>
            <invalidLength>The comment field is too long.  This field must be no more than 255 bytes long.</invalidLength>
        </comment>
        <dateAdded>
            <label>dateAdded</label>
            <comment/>
            <maxlength>0</maxlength>
            <scale>0</scale>
            <invalidType>The dateAdded field does not contain valid data.  This field must be a date value.</invalidType>
        </dateAdded>
    </user>


--

You received this message because you are subscribed to the Google Groups "Reactor" group.
To post to this group, send email to reacto...@googlegroups.com.
To unsubscribe from this group, send email to reactor-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reactor-users?hl=en.



--
Chuck Savage
SeaRisen.com
Reply all
Reply to author
Forward
0 new messages