You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Dirk Eschner <di...@eschner.com> on 2000/02/25 16:12:59 UTC

difference between local and remote execution

Hi,

I am trying to create an xml-Document which has different sections.  Each 
section is generated by a seperate Method, which contains the necessary 
Element-Object in its Signature. After executing the Method this Element is 
returned. Please see the code of such a Method

  public Element getByElement(Element elemRoot) {
    Document doc = elemRoot.getOwnerDocument();
    Element elem = doc.createElement("lowest");
    elemRoot.appendChild(elem);
    return elemRoot;
  }

This works fine on the local machine. But, when I use the same Methods 
through RMI I always got the Exception WRONG_DOCUMENT_ERR.

org.apache.xerces.dom.DOMExceptionImpl: WRONG_DOCUMENT_ERR
	at org.apache.xerces.dom.NodeImpl.internalInsertBefore(NodeImpl.java:603)
	at org.apache.xerces.dom.NodeImpl.insertBefore(NodeImpl.java:577)
	at org.apache.xerces.dom.DocumentImpl.insertBefore(DocumentImpl.java:246)
	at org.apache.xerces.dom.NodeImpl.appendChild(NodeImpl.java:387)
	at RMIClient.main(RMIClient.java:30)

When I call another Method, which gives a whole Document back, everything 
is ok.

Whats wrong? Did you see a solution or work around?

Thanks very much!
Dirk

PS: Did you need more source?