This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 151430 - org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
Summary: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different d...
Status: CLOSED INCOMPLETE
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Peter Zavadsky
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-27 10:39 UTC by Marian Mirilovic
Modified: 2010-04-22 10:39 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 3605


Attachments
stacktrace (2.66 KB, text/plain)
2008-11-01 11:08 UTC, Maksim Khramov
Details
stacktrace (115 bytes, text/plain)
2008-11-07 11:19 UTC, sunbiz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2008-10-27 10:39:59 UTC
51 duplicates so far .. the last one reported against NB 6.5 Beta ... so probably already fixed ?

Build: NetBeans IDE Dev (Build 200709111200)
VM: Java HotSpot(TM) Client VM, 1.5.0_12-b04
OS: Windows XP, 5.1, x86
User comments: 
STACKTRACE: (first 10 lines)
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
        at org.apache.xerces.dom.RangeImpl.setEnd(RangeImpl.java:0)
        at org.netbeans.modules.visualweb.designer.jsf.text.DomRangeImpl.setMark(DomRangeImpl.java:243)
        at org.netbeans.modules.visualweb.text.DesignerCaret.handleSetDot(DesignerCaret.java:947)
        at org.netbeans.modules.visualweb.text.DesignerCaret.setDot(DesignerCaret.java:835)
        at org.netbeans.modules.visualweb.text.DesignerCaret.positionCaret(DesignerCaret.java:255)
        at org.netbeans.modules.visualweb.text.DesignerCaret.adjustCaret(DesignerCaret.java:443)
        at org.netbeans.modules.visualweb.text.DesignerCaret.adjustCaretAndFocus(DesignerCaret.java:431)
        at org.netbeans.modules.visualweb.text.DesignerCaret.mousePressed(DesignerCaret.java:425)
        at org.netbeans.modules.visualweb.text.DesignerPaneBase.mousePressed(DesignerPaneBase.java:1716)
        at org.netbeans.modules.visualweb.designer.InteractionManager.setInsertBox(InteractionManager.java:258)
Comment 1 Peter Zavadsky 2008-10-27 17:41:16 UTC
There were already filled issues similar to this, but we were unable to reproduce those.

Could you, please, provide steps how to reproduce that? It is hard (almost impossible) to guess what went wrong, without
that. Thanks.
Comment 2 Maksim Khramov 2008-11-01 11:07:59 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
        at org.apache.xerces.dom.RangeImpl.setEnd(RangeImpl.java:0)
        at org.netbeans.modules.visualweb.designer.jsf.text.DomRangeImpl.setMark(DomRangeImpl.java:287)
        at org.netbeans.modules.visualweb.text.DesignerCaret.handleSetDot(DesignerCaret.java:976)
        at org.netbeans.modules.visualweb.text.DesignerCaret.setDot(DesignerCaret.java:863)
        at org.netbeans.modules.visualweb.text.DesignerCaret.positionCaret(DesignerCaret.java:279)
        at org.netbeans.modules.visualweb.text.DesignerCaret.adjustCaret(DesignerCaret.java:467)
Comment 3 Maksim Khramov 2008-11-01 11:08:10 UTC
Created attachment 73042 [details]
stacktrace
Comment 4 sunbiz 2008-11-07 11:19:04 UTC
Build: NetBeans IDE Dev (Build 200811060201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows Vista, 6.0, x86

User Comments: 
Double clicked on VIR_ApacheDerby under Data Source References for the sample VIR project

Stacktrace: 
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
        at org.apache.xerces.dom.RangeImpl.setEnd(RangeImpl.java:0)
        at org.netbeans.modules.visualweb.designer.jsf.text.DomRangeImpl.setMark(DomRangeImpl.java:287)
        at org.netbeans.modules.visualweb.text.DesignerCaret.handleSetDot(DesignerCaret.java:987)
        at org.netbeans.modules.visualweb.text.DesignerCaret.setDot(DesignerCaret.java:864)
        at org.netbeans.modules.visualweb.text.DesignerPaneBase.setCaretDot(DesignerPaneBase.java:1703)
        at org.netbeans.modules.visualweb.designer.InteractionManager.updateDropState(InteractionManager.java:879)
Comment 5 sunbiz 2008-11-07 11:19:17 UTC
Created attachment 73457 [details]
stacktrace
Comment 6 Maksim Khramov 2008-11-20 08:39:36 UTC
Product Version: NetBeans IDE 6.1 (Build 200805300101)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b12

Steps to reproduce:
Create page and set page layout to flow mode.
Create pagefragment document and add component on it (for example webuijsf:image ).
Add page fragment on page.
Close and reopen page.
Now click on free page area then click on image in pagefragment area.
Exception is thrown
Comment 7 Maksim Khramov 2008-11-20 11:29:59 UTC
Reproduced now in 6.5 build 200811100001
Comment 8 andre0815 2009-02-18 17:06:12 UTC
We have the same Problem on RMModelHelper :
org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it.
	at org.apache.xerces.dom.ParentNode.internalInsertBefore(Unknown Source)
	at org.apache.xerces.dom.ParentNode.insertBefore(Unknown Source)
	at
com.inubit.ibis.configuration.webservice.qos.model.DocumentModelAccessImpl.insertBefore(DocumentModelAccessImpl.java:268)
	at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.insertBefore(AbstractDocumentComponent.java:487)
	at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.insertAtIndexQuietly(AbstractDocumentComponent.java:295)
	at org.netbeans.modules.xml.xam.dom.AbstractDocumentComponent.insertAtIndexQuietly(AbstractDocumentComponent.java:74)
	at org.netbeans.modules.xml.xam.AbstractComponent._insertAtIndexQuietly(AbstractComponent.java:122)
	at org.netbeans.modules.xml.xam.AbstractComponent.addChild(AbstractComponent.java:301)
	at org.netbeans.modules.xml.xam.AbstractComponent.addAfter(AbstractComponent.java:253)
	at org.netbeans.modules.xml.wsdl.model.impl.BindingImpl.addExtensibilityElement(BindingImpl.java:83)
	at org.netbeans.modules.websvc.wsitconf.wsdlmodelext.PolicyModelHelper.createPolicy(PolicyModelHelper.java:218)
	at org.netbeans.modules.websvc.wsitconf.wsdlmodelext.RMModelHelper.enableRM(RMModelHelper.java:134)


Our insertBefore Method is the following :
public void insertBefore(Node node, Node newChild, Node refChild, DocumentModelAccess.NodeUpdater updater) {
        node.insertBefore(newChild, refChild);
}

pleease fix. We are not able to use the good NetbeansHelpers.
Comment 9 Marian Mirilovic 2010-04-22 10:39:52 UTC
v/c