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.
Please look at http://www.netbeans.org/issues/show_bug.cgi?id=134382. Currently I can't really fix it, because xdm model doesn't tell me that something went wrong, or how to revert from such failure. XDM model should: - detect that file to be flushed into is missing - recreate the file and flush correctly - in case the above failed as well, throw a specific fatal error exception to notify clients that the model is corrupted and cannot be corrected Currently none of the above happens, just a NPE is thrown: java.lang.NullPointerException org.netbeans.modules.xml.xdm.XDMModel.flushDocument(XDMModel.java:880) org.netbeans.modules.xml.xdm.XDMModel.flush(XDMModel.java:145) org.netbeans.modules.xml.xdm.xam.XDMAccess.flush(XDMAccess.java:110) org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:326) org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:313) which doesn't help.
I looked at issue 134382 and it sounded stupid for someone to go outside the IDE and delete the file you're working with. Now from API stand-point, I do agree that flush needs to throw exception similar to sync. Which means API change. This will be treated as an enhancement for post 6.5.