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 41609 - <makeparserdb> failing because Services is not a folder
Summary: <makeparserdb> failing because Services is not a folder
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2004-04-01 19:24 UTC by Jesse Glick
Modified: 2008-12-22 18:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-04-01 19:24:21 UTC
As of today, trying to build
apisupport/apidocs/build.xml#parser-db fails (i.e.
creates empty DBs and prints stack traces, though
the target finishes). I put some additional
logging into DataFolder.findFolder and now I see:

java.lang.IllegalArgumentException: Not a
DataFolder:
MultiFileObject@1b60280[nbfs://nbhost/SystemFileSystem/Services]
(was a org.openide.loaders.DefaultDataObject)
(file is folder? false)
        at
org.openide.loaders.DataFolder.findFolder(DataFolder.java:497)
[catch] at
org.netbeans.core.LookupCache.loadDirect(LookupCache.java:83)

where loadDirect is just doing

FileObject services =
Repository.getDefault().getDefaultFileSystem().findResource("Services");
DataFolder servicesF =
DataFolder.findFolder(services);

i.e. for some reason the system file system has
something called "Services", but it is a file
rather than a folder.

This only happens inside this Ant task (run inside
or outside of NB). I checked the list of modules
MakeParserDB.java includes in its CP. Some of them
do have layers and these layers do have Services,
but as a folder, not a file.

I suspected the recent patch to
AbstractFolder.fileCreated0, but I seem to get the
error even after temporarily reverting that.

I am not sure how to track down why the SFS would
consider this a file rather than a folder. Any ideas?
Comment 1 rmatous 2004-04-02 08:45:03 UTC
Problem seems to be somewhere in XMLFS.
Comment 2 rmatous 2004-04-02 13:09:47 UTC
Fixed. Fragile code in XMLFileSystem together with recent patch
AbstractFolder.fileCreated0 caused this problem. 

/cvs/openide/src/org/openide/filesystems/AbstractFolder.java,v  <-- 
AbstractFolder.java
new revision: 1.74; previous revision: 1.73

/cvs/openide/src/org/openide/filesystems/FileObject.java,v  <-- 
FileObject.java
new revision: 1.84; previous revision: 1.83

/cvs/openide/test/unit/src/org/openide/filesystems/TestUtilHid.java,v
 <--  TestUtilHid.java
new revision: 1.13; previous revision: 1.12

/cvs/openide/test/unit/src/org/openide/filesystems/XMLFileSystemTest.java,v
 <--  XMLFileSystemTest.java
new revision: 1.7; previous revision: 1.6
Comment 3 Tomas Danek 2005-08-01 09:18:39 UTC
consider as solved, closing.