Bug 333244 - The type java.lang.Object cannot be resolved - misleading for corrupt .classpath
Summary: The type java.lang.Object cannot be resolved - misleading for corrupt .classpath
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Jay Arthanareeswaran CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2010-12-27 09:48 EST by Ralf Hauser CLA
Modified: 2011-01-25 07:15 EST (History)
4 users (show)

See Also:


Attachments
ObjectCannotBeResolved.png (5.05 KB, image/png)
2010-12-27 09:49 EST, Ralf Hauser CLA
no flags Details
workSpaceSettings.png (15.31 KB, image/png)
2010-12-27 09:50 EST, Ralf Hauser CLA
no flags Details
classpathProblems.png (3.42 KB, image/png)
2010-12-27 10:00 EST, Ralf Hauser CLA
no flags Details
Log file (23.98 KB, application/octet-stream)
2011-01-07 05:30 EST, Jay Arthanareeswaran CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2010-12-27 09:48:20 EST
Build Identifier: 20100917-0705  Helios Service Release 1

see also Bug 257347, Bug 106806, Bug 255931, Bug 239589

Reproducible: Always
Comment 1 Ralf Hauser CLA 2010-12-27 09:49:16 EST
Created attachment 185837 [details]
ObjectCannotBeResolved.png

... and the additional errors visible top left of class-file editor
Comment 2 Ralf Hauser CLA 2010-12-27 09:50:33 EST
Created attachment 185838 [details]
workSpaceSettings.png

other projects depending on the same global profile compile like a charm
Comment 3 Ralf Hauser CLA 2010-12-27 10:00:52 EST
Created attachment 185839 [details]
classpathProblems.png

apparently, this was the reason
Comment 4 Ralf Hauser CLA 2010-12-27 10:03:18 EST
Suggestions:
1) Add a quick-fix that suggests to look at the .classpath
2) if the .classpath is the reason, don't just add a yellow warning, but
   a) make a red warning
   b) add a mouse-over that says more about the problem
Comment 5 Jay Arthanareeswaran CLA 2011-01-03 01:37:53 EST
(In reply to comment #4)
> Suggestions:
> 1) Add a quick-fix that suggests to look at the .classpath
> 2) if the .classpath is the reason, don't just add a yellow warning, but
>    a) make a red warning
>    b) add a mouse-over that says more about the problem

What's the problem with the .classpath file? Could you attach the classpath file here?
Comment 6 Ralf Hauser CLA 2011-01-03 02:01:31 EST
don't have the exact file anymore, but it was kind of empty - something like

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="output" path="trunk/junit/classes"/>
</classpath>
Comment 7 Olivier Thomann CLA 2011-01-05 14:40:50 EST
Jay, please investigate.
Comment 8 Jay Arthanareeswaran CLA 2011-01-07 00:10:29 EST
Nothing particularly wrong with the given .classpath file format that could have caused an error. When there is a format error with the .classpath file, a build path error is displayed in the problems view. Do you remember seeing it? Also, if you can share the log file when the error occurred, it would help.
Comment 9 Jay Arthanareeswaran CLA 2011-01-07 05:30:29 EST
Created attachment 186255 [details]
Log file

Thanks for the log file, Ralf. I have attached the relevant portion alone here. 
I am able to reproduce the exception trace when I corrupt the .classpath manually and after a refresh open the build path properties dialog. However, invariably the problems marker gets updated with the appropriate error message. I guess there is something else. Perhaps the refresh wasn't successful?

Also I noticed some NPE (bug #326434), which have been fixed in 3.6 maintenance branch. So, I recommend you try a newer build.
Comment 10 Jay Arthanareeswaran CLA 2011-01-17 08:23:07 EST
(In reply to comment #9)
> Also I noticed some NPE (bug #326434), which have been fixed in 3.6 maintenance
> branch. So, I recommend you try a newer build.

Did you get a chance to try this?
Comment 11 Jay Arthanareeswaran CLA 2011-01-19 08:47:00 EST
(In reply to comment #10)
> Did you get a chance to try this?

Ralf, any update on this?
Comment 12 Jay Arthanareeswaran CLA 2011-01-24 09:09:51 EST
Marking as 'RESOLVED'. Please reopen if the bug occurs again.
Comment 13 Ayushman Jain CLA 2011-01-25 07:15:44 EST
Verified for 3.7M5 using build I20110124-1800