WRONG_DOCUMENT_ERR: A Node Is Used In A Different Document Than The One That Created It

Posted May 14, 2007 at 1:33 PM by Ben Nadel

Tags: ColdFusion

Earlier today, I posted about transferring XML nodes from one ColdFusion XML document object to another. I briefly mentioned that if you try to do that without first importing the target nodes, ColdFusion will throw the following error:

WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it

It turns out though, this is the same error you would get for trying to add the same node to multiple parents of the same document (something I did accidentally in my code). This error, which made sense for the different documentation use, makes very little sense here (using this wording). Anyway, just thought I would post this finding in case anyone comes across it and is like "But I am only using ONE document?!?!?!?"




Reader Comments

May 30, 2011 at 8:51 AM // reply »
2 Comments

Hey man,

I was getting the exact same error too. But in a very different context.

I used Axis to generate Java proxy class for a web service- all in eclipse.

But when I call one of the service methods through the proxy, i get this error (via Axis).

Can you help?

Raener


May 30, 2011 at 2:05 PM // reply »
11,241 Comments

@Raener,

Hmm, you've got me! I've never actually touched the Axis files directly -- I've only ever gone through ColdFusion and had them do it behind the scenes (ie. using the ?wsdl style invocation).

I wouldn't even know where to begin debugging something like this. Sorry :(


Jun 1, 2011 at 4:41 AM // reply »
2 Comments

@Ben

Oh okay, thanks neway mate :)
Spent some hours but did figure it out eventually.
It was due to a mal-formed SOAP reply from the sever, and that too a govt server :P

Raener


Jun 3, 2011 at 10:55 PM // reply »
11,241 Comments

@Raener,

Glad you got it sorted out. SOAP, in general, is a bit of a bear to deal with :)


Sue
Oct 18, 2011 at 10:15 AM // reply »
1 Comments

What is the solution to this? I am getting same error.


Oct 19, 2011 at 2:44 PM // reply »
2 Comments

Hi, I have the same problem, I noticed that a fault SOAP response with a detail node is causing the problem. Could you confirm if you are in the same situation, it could give us a clue to find the solution.


Oct 19, 2011 at 7:17 PM // reply »
2 Comments

Hi, I found a solution on this page. It worked for me.

https://issues.apache.org/jira/browse/AXIS-2705


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2013 at 5:35 PM
Script Tags, jQuery, And Html(), Text() And Contents()
This is still an issue 2 years later. jQuery is supposed to remediate these cross browser issues, no? I have been unable to find any statement from the jQuery team calling this behavior "by de ... read »
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools