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.
I opened web.xml in text mode side by side with the visual config editors for sun-web.xml. Then I created a new empty line right below <web-app...>, typed "<servlet>" and got this exception popup as soon as I typed the closing ">". Annotation: Exception occurred in Request Processor java.lang.IllegalStateException: BaseDocument.write() at org.openide.text.CloneableEditorSupport.getInputStream(CloneableEditorSupport.java:1122) at org.netbeans.modules.xml.multiview.XmlMultiViewDataObject.createInputStream(XmlMultiViewDataObject.java:169)
Created attachment 20492 [details] stack trace
Upon checking my log, it appears the exception that popped up actually followed another one that was displayed in the log only and had more information. See second attachment and disregard first one.
Created attachment 20493 [details] Much better stack trace than original attachment.
I noticed that as well few times during editing. The exception is caused by BadLocationException from CloneableEditorSupport:getInputStream() method. However today I am not able to reproduce that. Basically, we call the CloneableEditorSupport:getInputStream() method (after couple of changes in DD editor) to get the data model and to synchronize with the graphical view. Jarda, can you help how we can prevent the BadLocationException ?
I doubt I can prevent it, it can be thrown by anyone. I've just add better debug messages to know who is causing the exception. cvs ci -m "Improving debugging capabilities" cvs commit: Examining . Checking in CloneableEditorSupport.java; /cvs/openide/src/org/openide/text/CloneableEditorSupport.java,v <-- CloneableEditorSupport.java new revision: 1.141;
I was not able to reproduce the issue any more. It (most likely) fixed by fixing the issue 38853. Diff: http://xml.netbeans.org/source/browse/xml/multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewDataObject.java.diff?r1=1.29&r2=1.30
Verified.