Bug 9173 - Exception about missing org.eclipse.core.boot\.classpath file?
Summary: Exception about missing org.eclipse.core.boot\.classpath file?
Status: RESOLVED DUPLICATE of bug 16789
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 F2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-06 10:45 EST by Simon Arsenault CLA
Modified: 2002-06-03 14:28 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Arsenault CLA 2002-02-06 10:45:03 EST
I was running build 2002-01-24 and upgraded to build 2002-02-05. When I started 
eclipse, it reported the exceptions below while trying to open the 3 type 
hierarchy perspective I had. I checked, the .classpath file existed in the 01-
24 build, but not in the latest one. Is this a known problem?

1 org.eclipse.core.resources 4 Exception creating editor: Core exception: Core 
exception: File not found: D:\eclipse-
sdk\runtime\eclipse\plugins\org.eclipse.core.boot\.classpath.
Log: Wed Feb 06 10:40:32 EST 2002
1 org.eclipse.core.resources 4 Exception creating editor: Core exception: Core 
exception: File not found: D:\eclipse-
sdk\runtime\eclipse\plugins\org.eclipse.core.boot\.classpath.
Log: Wed Feb 06 10:40:34 EST 2002
1 org.eclipse.core.resources 4 Exception creating editor: Core exception: Core 
exception: File not found: D:\eclipse-
sdk\runtime\eclipse\plugins\org.eclipse.core.boot\.classpath.
Comment 1 John Arthorne CLA 2002-02-06 11:14:53 EST
Moving to JDT_UI for comment.  The java editor seems to be searching for the 
.classpath file but it has been deleted in the filesystem.

The core exception above is the standard exception that is thrown when 
IFile#getContents() is called on a file that does not exist in the filesystem.
Comment 2 Martin Aeschlimann CLA 2002-05-01 07:05:30 EDT
I think this happend when deleting the projects contents in the background 
(refresh from local missing).

To fix this, core would have to do a refresh from local automatically on 
startup.
Comment 3 DJ Houghton CLA 2002-05-01 09:13:45 EDT
Were you editing your project contents outside of Eclipse?

Re: the refresh local on startup-
Users are able to do a refreshLocal on startup if they choose by the -refresh 
command line argument.

We do not do it for free since:
(1) it can be expensive 
(2) it can potentially do a lot of work (run builds, etc)
(3) normal use-case there is no work to do

Comment 4 Simon Arsenault CLA 2002-05-01 09:29:50 EDT
These projects were "added" to my workspace using the PDE import plugin wizard. 
I think at that time, it did not actually make a copy into my workspace 
directory, but instead actually added files (like the .classpath) into the host 
directory which I was importing from. So upgrading to a new version overwrote 
the host directory, causing the .classpath to be removed. 

The PDE plugin import actually copies the plugin now into the workspace by 
default. So this problem is less likely to occur.

Either way, we should handle this case better. If the file does not exist for 
the resource .classpath, we should warn the user and default to something. 
Probably something the JDT team will need to do...not sure if Core can help 
here.
Comment 5 DJ Houghton CLA 2002-05-01 13:12:55 EDT
Adding Philippe to the CC list.

What does JDT do when it has been discovered that the classpath file is 
manually deleted by the user?
Is there anything that Core can do to help in this case?
Comment 6 DJ Houghton CLA 2002-05-19 09:53:24 EDT
Moving to JDT/Core for comment.
Comment 7 Philipe Mulet CLA 2002-05-22 08:50:39 EDT
If the .classpath file is missing or not parseable, an exception is thrown.
In 1.0, we did silently revert to an empty classpath, but this was condamned as 
a bad approach by clients.

Comment 8 Philipe Mulet CLA 2002-05-28 09:50:35 EDT
Clarification: if the .classpath corruption/deletion is notified to jdt/core, 
then it will add a marker, and silently revert to a default classpath.

The log will also be populated each time the .classpath is attempted to be read.

Closing.

*** This bug has been marked as a duplicate of 16789 ***
Comment 9 Olivier Thomann CLA 2002-06-03 14:28:56 EDT
I corrupted a .classpath file and I was silently replaced by a valid one when I change a source 
folder. I don't know if this should be silently changed or if the user should get a warning.