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 55199 - Scanning for Classpaths dies if a recursive symbolic-link is present.
Summary: Scanning for Classpaths dies if a recursive symbolic-link is present.
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Matula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-18 15:39 UTC by josephcz
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 josephcz 2005-02-18 15:39:56 UTC
When scanning for classpaths NetBeans is unable to
detect recursive symbolic links. This results in
the scan cycling through the links until it runs
out of memory. After this has happened most
features that depend on the class path scan will
not function properly.

The following illustrates the directory structure:
  com
   +- foo
       +- bar
       +- baz
           +- foo --> ../../foo

Where ./com/foo/baz/foo is a symbolic link to
./com/foo.

After running out of memory NetBeans will display
a message in the status bar that repeats this
cycle until it runs out of room
(.../foo/baz/foo/baz/foo/baz/foo/baz/...).

Just detecting circular links and then skipping
them is probably not sufficient since some classes
may be in the com.foo.baz.foo.bar package (that is
physically located at ./com/foo/bar although using
the symbolic link java and javac are able to find
them via ./com/foo/baz/foo/bar).


WORKAROUND:
  - Remove the symbolic link (will not work for
all cases).
Comment 1 Martin Matula 2005-02-22 16:42:29 UTC
I'll look at it. But the obscure scenario that you describe will most
likely not be supported. The recursive links will probably be ignored.
Comment 2 Martin Matula 2005-02-23 15:50:25 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/scanning/FObjectInfo.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FObjectInfo.java,v
 <--  FObjectInfo.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/javacore/scanning/FileEntry.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileEntry.java,v
 <--  FileEntry.java
new revision: 1.4; previous revision: 1.3
done
Checking in src/org/netbeans/modules/javacore/scanning/FileInfo.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileInfo.java,v
 <--  FileInfo.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/javacore/scanning/FileScanner.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/FileScanner.java,v
 <--  FileScanner.java
new revision: 1.19; previous revision: 1.18
done
Checking in src/org/netbeans/modules/javacore/scanning/ZipDirInfo.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/ZipDirInfo.java,v
 <--  ZipDirInfo.java
new revision: 1.3; previous revision: 1.2
done
Checking in src/org/netbeans/modules/javacore/scanning/ZipEntryInfo.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/scanning/ZipEntryInfo.java,v
 <--  ZipEntryInfo.java
new revision: 1.3; previous revision: 1.2
done
Comment 3 Quality Engineering 2007-09-20 10:32:48 UTC
Reorganization of java component