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 45345

Summary: FileNotFound from JMManager if a java file not in any project is deleted
Product: java Reporter: Martin Matula <mmatula>
Component: UnsupportedAssignee: Martin Matula <mmatula>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Martin Matula 2004-06-22 12:02:03 UTC
Steps to reproduce:
1. open a project in IDE
2. open some files in this project in the editor
3. close the project in IDE
4. delete the whole project folder from the disk
externally
5. switch back to the IDE

The following exception occurs:

Annotation: File not found. Another application
may have moved the file or changed the name.
java.io.FileNotFoundException: <filename> (The
system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at
java.io.FileInputStream.<init>(FileInputStream.java:106)
at
org.openide.filesystems.LocalFileSystem.inputStream(LocalFileSystem.java:351)
at
org.openide.filesystems.LocalFileSystem$Impl.inputStream(LocalFileSystem.java:548)
at
org.openide.filesystems.AbstractFileObject.getInputStream(AbstractFileObject.java:156)
at
org.netbeans.modules.masterfs.MasterFileObject.getInputStream(MasterFileObject.java:122)
at
org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider.findJavaPackage(DefaultClassPathProvider.java:157)
at
org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider.getRootForFile(DefaultClassPathProvider.java:118)
at
org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider.findClassPath(DefaultClassPathProvider.java:91)
at
org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPath.java:396)
at
org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:279)
at
org.netbeans.modules.javacore.RepositoryUpdater.run(RepositoryUpdater.java:154)
at org.openide.util.Task.run(Task.java:136)
at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
Comment 1 Martin Matula 2004-06-22 13:29:50 UTC
Fixed.

Checking in src/org/netbeans/modules/javacore/RepositoryUpdater.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/RepositoryUpdater.java,v
 <--  RepositoryUpdater.java
new revision: 1.8; previous revision: 1.7
done
Comment 2 Quality Engineering 2007-09-20 09:56:58 UTC
Reorganization of java component