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 15547 - [NB321 compat.] AntProjectDataObject versus XMLDataObject
Summary: [NB321 compat.] AntProjectDataObject versus XMLDataObject
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 15397 15516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-09-17 10:07 UTC by Martin Roskanin
Modified: 2003-06-30 14:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception thrown during startup of NBdev(14.09) with NB3.2.1 user dir (1.94 KB, text/plain)
2001-09-18 08:49 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2001-09-17 10:07:39 UTC
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.
Comment 1 Jesse Glick 2001-09-17 22:20:54 UTC
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.
Comment 2 Martin Roskanin 2001-09-18 08:46:23 UTC
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. 


Comment 3 Martin Roskanin 2001-09-18 08:49:40 UTC
Created attachment 2577 [details]
Exception thrown during startup of NBdev(14.09) with NB3.2.1 user dir
Comment 4 Jesse Glick 2001-09-19 09:50:26 UTC
*** Issue 15516 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2001-09-19 10:05:00 UTC
Should be fixed in AntProjectDataLoader.java 1.16, please verify...
Comment 6 David Konecny 2001-09-20 15:14:57 UTC
*** Issue 15397 has been marked as a duplicate of this issue. ***
Comment 7 Martin Roskanin 2001-09-20 16:15:35 UTC
It works in 20.09. build. Thanks.
Comment 8 Jesse Glick 2001-09-29 10:33:42 UTC
*** Issue 15516 has been marked as a duplicate of this issue. ***
Comment 9 Jesse Glick 2001-09-29 10:38:03 UTC
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.
Comment 10 Jan Zajicek 2001-10-01 08:33:31 UTC
verified in dev 2001101 - for both 3.2 and 3.1 upgrades
Comment 11 Quality Engineering 2003-06-30 14:47:51 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.