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.
The problem: Creation of new FileObject of XML type FileObject fileObject = folder.getPrimaryFile().createData(fileName, "xml"); and following DataObject dobj = DataObject.find(fileObject); will bring the following results in accordance with the importing OR not importing settings from NB 3.2.1: 1) If you don't import settings: created fileObject:Editors/text/x-properties/macros.xml finded DO:org.openide.loaders.XMLDataObject@ab67f[Editors/text/x-properties/macros.xml] That is right. 2) If you import settings from NB 3.2.1 via startup parameter -user <path> created fileObject:Editors/text/x-properties/macros.xml finded DO:org.apache.tools.ant.module.loader.AntProjectDataObject@31a9a8[Editors/text/x-properties/macros.xml] And that's bad. Bad loaded is used. BUILD NB [maintrunk] 14.09. JDK 1.3 I am sorry, if I entered the bug against incorrect module.
Can you give me some idea what is in this XML file? I assume it is not really an Ant script. Also did you customize anything in NB 3.2.1 before importing these settings, and if so what? And after loading the 3.2.1 settings, are all XML files recognized as Ant scripts, or just this one? What does your loader pool (Tools | Options | Object Types) look like after loading 3.2.1 settings (specifically Ant objects)? Actually I have a guess... Ant Scripts object type may list both text/x-ant+xml and *.xml extension in its expert tab, pls. confirm.
In this XML file are editor settings. For example mentioned empty macros.xml looks: <?xml version="1.0"?> <!DOCTYPE macros PUBLIC "-//NetBeans//DTD Editor Macros settings 1.0//EN" "http://www.netbeans.org/dtds/EditorMacros-1_0.dtd"> <macros/> In 3.2.1 I didn't customize nothing special, just editor settings. (In this case I customized only coloring.) But what is strange, all files are detected as ant type. What to do to reproduce it: 1.Start new NB 3.2.1. 2.Don't import any settings, use only blank NB3.2.1 3.DO nothing, just close NB 3.2.1 4.Use latest dev build (14.09) 5.Run it through -userdir <nb3.2.1 user dir> 6.Exception should occur. (see attachement) 7.All XML files (include empty XML files) are displayed in explorer window as ANT. (some of them marked with red cross as not well parsed) Such session is unbelievable slow. I am not able to open Options windows for example.
Created attachment 2577 [details] Exception thrown during startup of NBdev(14.09) with NB3.2.1 user dir
*** Issue 15516 has been marked as a duplicate of this issue. ***
Should be fixed in AntProjectDataLoader.java 1.16, please verify...
*** Issue 15397 has been marked as a duplicate of this issue. ***
It works in 20.09. build. Thanks.
Was not completely fixed, fixed again with AntProjectDataLoader.java 1.17. The fix was not active in case the regular deserialization of the loader threw a "safe" exception, which is caught by Ant loader because of a missing action which was present in the context menu in 3.1. Now the workaround is run whether or not this additional problem is worked around. Tested with: - reuse of NB 3.1 multi-user user dir - import of NB 3.1 single-user installation (but winsys exceptions seem to prevent the IDE from even starting) - f4jie 2.0 user dir (ditto) - nb 3.0 single-user (ditto) Re. the exceptions above, the IDE seems to be mostly deadlocked (infinite loop in Folder Recognizer inside FolderOrder, cf. maybe recent changes in this class), with other threads blocked on that.
verified in dev 2001101 - for both 3.2 and 3.1 upgrades
Resolved for 3.3.x or earlier, no new info since then -> closing.