Bug 144099 - The type java.lang.Class cannot be resolved. error annotations
Summary: The type java.lang.Class cannot be resolved. error annotations
Status: RESOLVED DUPLICATE of bug 140879
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-28 00:21 EDT by Matt Magoffin CLA
Modified: 2007-07-29 09:20 EDT (History)
0 users

See Also:


Attachments
Screen shot of the bogus error annotation. (36.74 KB, image/png)
2006-05-28 00:23 EDT, Matt Magoffin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Magoffin CLA 2006-05-28 00:21:13 EDT
After working in Eclipse 3.2 (this has happened for me in RC3-5) for some time and after making changes in several Java source files, Eclipse starts to add some error annotations to open Java sources. The compiler does not seem to have any problems compiling the class, however. The problem will not go away until I quit Eclipse and restart it. Then the bogus error annotations go away, until another short period of work.

The problem seems to start happening somewhat randomly, sorry I can't provide a test case that illustrates the problem but I will attach a screen shot.

I've seen some other bug reports that seem similar, but for older versions, and couldn't seem to find an open report for the 3.2 series.
Comment 1 Matt Magoffin CLA 2006-05-28 00:23:55 EDT
Created attachment 42810 [details]
Screen shot of the bogus error annotation.

Here is the error annotation. Note the class itself, in the Package Explorer, does not show any compile errors (in fact there aren't any errors in this Java file).
Comment 2 Philipe Mulet CLA 2006-05-29 06:16:33 EDT
This could be an issue in the editor reconcile action, which uses the compiler to compute on the fly errors when you type.

If it is inconsistent with building, as you describe, then it indicates a bug indeed. Now, in order to address it, we would need some steps to reproduce.
Could you provide your workspace, or reduce it to something smaller ?
Comment 3 Matt Magoffin CLA 2006-05-29 19:51:45 EDT
My workspace is too large to attach, but I created a bzip2 tarball, available here: 

http://msqr.us/ws-3.2.tbz2

The project in this workspace is expecting the Sysdeo Tomcat plugin.
Comment 4 Jerome Lanneluc CLA 2006-05-30 07:09:44 EDT
Could you please provide the workspace as a zip file ?
Also where can I get the Sysdeo Tomcat plugin ? What version ? 
Also I'm not sure I'm allowed to download this plugin. A workspace not depending on this plugin would be prefered.
Comment 5 Matt Magoffin CLA 2006-05-30 15:06:35 EDT
I have limited bandwidth on msqr.us, if you can work with the bzip-tar that would help greatly. Sysdeo's Tomcat plugin is available here: http://www.sysdeo.com/eclipse/tomcatplugin. The workspace is not entirely dependent on it; if you don't have the plugin then then you need to simply define a classpath variable TOMCAT_HOME.
Comment 6 Jerome Lanneluc CLA 2006-05-31 06:17:56 EDT
I finally was able to uncompress your workspace.
It seems that it depends on other things than the tomcat plugin. For instance, I see that the following libraries are missing:
- TOMCAT_HOME\common\lib\jasper-runtime.jar
- TOMCAT_HOME\common\lib\jsp-api.jar
- TOMCAT_HOME\common\lib\servlet-api.jar
Comment 7 Matt Magoffin CLA 2006-05-31 18:21:11 EDT
Yes, you need to define a classpath variable TOMCAT_HOME that points to a local Tomcat 5 directory.
Comment 8 Jerome Lanneluc CLA 2006-06-01 04:05:46 EDT
The problem is how I get 
- jasper-runtime.jar
- jsp-api.jar
- servlet-api.jar
Those are not included in the Tomcat plugin you indicated.
Comment 9 Jerome Lanneluc CLA 2006-06-01 06:51:15 EDT
In the meantime, could you please delete org.eclipse.jdt.core_3.2.0.v_668.jar from
your plugins directory, copy
http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_3.2.0.z20060531-1812.jar
to this plugins directory instead, and let me know if this improves things ?
Comment 10 Jerome Lanneluc CLA 2006-06-02 07:48:36 EDT
Please ignore patch in comment 9. I identified the cause (bad side effect on a MethodInfo in the Java model cache) and posted a new patch. Could you please delete any org.eclipse.jdt.core_3.2.0.*.jar from your plugins directory, copy
http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_3.2.0.z20060602-1334.jar
to this plugins directory instead, and confirm this fixes the problem ?
Comment 11 Jerome Lanneluc CLA 2006-06-02 07:58:12 EDT
If the patch fixes the problem, this bug would be a dup of bug 140879.
Comment 12 Matt Magoffin CLA 2006-06-06 19:15:03 EDT
Sorry for not getting back sooner, I didn't seem to get bug emails for your last few comments. I'm downloading the patched JAR and will let you know if it resolves the issue for me.
Comment 13 Matt Magoffin CLA 2006-06-06 20:47:53 EDT
The patched JAR you provided does seem to have fixed the issue for me, I have not seen the issue yet since installing it.
Comment 14 Jerome Lanneluc CLA 2006-06-08 04:48:45 EDT
Thanks for the feedback. FYI the patch as been integrated in 3.2 RC7.

*** This bug has been marked as a duplicate of 140879 ***
Comment 15 Eclipse Webmaster CLA 2007-07-29 09:20:03 EDT
Changing OS from Mac OS to Mac OS X as per bug 185991