Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 202429

Summary: JRE System Library missing
Product: [Eclipse Project] JDT Reporter: C. Lamont Gilbert <clg-business>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, eclipse.20.tealeaf, jerome_lanneluc
Version: 3.2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
JRE System Library missing + in Package Explorer
none
Error messsages from issue
none
Error messsages from issue
none
shot of empty JRE none

Description C. Lamont Gilbert CLA 2007-09-06 08:30:42 EDT
Created attachment 77798 [details]
JRE System Library missing + in Package Explorer

Build ID: M20070212-1330

For some reason occasionally the JRE System Library in one of my projects does not have the + next to it.  And the files in that project report all JRE objects as missing and there is red everywhere.  Yet it seems to build and it certainly launches just fine.  I am using Execution Environments and have set the environments for 1.5 and 1.4 to different JREs.

I have attached 2 gifs showing pictures of symptoms of the issue.


Steps To Reproduce:
I dont know how to fully reproduce yet.

More information:
may be related to bug #139446


P.S. I hate the bug reporting "wizard" >:(  This bug should be against the JDT, but I cant set that.  Blame the wizard.
Comment 1 C. Lamont Gilbert CLA 2007-09-06 08:31:24 EDT
Created attachment 77799 [details]
Error messsages from issue
Comment 2 C. Lamont Gilbert CLA 2007-09-06 08:33:50 EDT
changed to JDT
Comment 3 C. Lamont Gilbert CLA 2007-09-06 08:37:51 EDT
Comment on attachment 77799 [details]
Error messsages from issue

need to delete this bad jpg but "improved" bugzilla wont allow it...
Comment 4 C. Lamont Gilbert CLA 2007-09-06 08:40:54 EDT
Created attachment 77800 [details]
Error messsages from issue
Comment 5 C. Lamont Gilbert CLA 2007-09-06 09:02:31 EDT
This bug occurs when Eclipse is closed and reopened with projects still open.  the workaround is to not close eclipse with projects still open.  Or when the error occurs, you can close, reopen, then rebuild the project.  I have not seen any errors in the platform log.

My default JRE is jdk1.5.0_11
J2SE1.5 is set to jdk1.5.0_11
J2SE1.4 is set to j2sdk1.4.2

Project settings
Jaba Compiler
  JDK Compliance
    compiler: 5.0
    Generated .class file compatibility: 1.4
    Source compatibility: 1.4

Java Build Path is set to use JRE System Library[J2SE-1.4]
Comment 6 Jerome Lanneluc CLA 2007-09-07 04:17:55 EDT
Moving to JDT/Debug
Comment 7 C. Lamont Gilbert CLA 2007-09-09 12:32:49 EDT
I found another requirement for the bug.  An editor on a java file from the project that uses the library must be open.  If there is no editor open, then the library is found/added as usual.  But if the editor is open when the project is open, then the library is not found/added, and the open editor will have highlights for all the references to core java classes as well as any classes that refer to core java classes.

So the requirements;

Project was open when eclipse was closed
Editor on java file of project was open when eclipse was closed
Some other relationship to the JRE that I am now aware of yet.
Comment 8 Darin Wright CLA 2007-09-10 10:02:48 EDT
In 3.3, I have seen something similar. However, in my case I restarted my workspace with no editors open and one project had compilation errors with "The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project."

Errors also appeared in the .log from the JUI color label provider like, as follows. However, this is due to the missing JRE (not the cause of the problem). I was able to expand the JRE, but each jar in the JRE appeared as empty.

Java Model Exception: Java Model Status [C:\jdk1.4.2_08\jre\lib\sunrsasign.jar is not on its project's build path]
at org.eclipse.jdt.internal.core.PackageFragmentRoot.getRawClasspathEntry(PackageFragmentRoot.java:587)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getVariableLabel(ColoredJavaElementLabels.java:834)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getArchiveLabel(ColoredJavaElementLabels.java:823)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getPackageFragmentRootLabel(ColoredJavaElementLabels.java:816)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getElementLabel(ColoredJavaElementLabels.java:147)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getElementLabel(ColoredJavaElementLabels.java:100)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels.getTextLabel(ColoredJavaElementLabels.java:82)
at org.eclipse.jdt.internal.ui.viewsupport.JavaUILabelProvider.getRichTextLabel(JavaUILabelProvider.java:175)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider.getRichTextLabel(PackageExplorerLabelProvider.java:70)
at org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider.getRichTextLabel(DecoratingJavaLabelProvider.java:84)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager$ManagedViewer.getColoredLabelForView(ColoredViewersManager.java:203)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager$ManagedViewer.access$0(ColoredViewersManager.java:193)
at org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager$1.getColoredLabel(ColoredViewersManager.java:149)
at org.eclipse.jdt.internal.ui.viewsupport.OwnerDrawSupport.performPaint(OwnerDrawSupport.java:87)
at org.eclipse.jdt.internal.ui.viewsupport.OwnerDrawSupport.handleEvent(OwnerDrawSupport.java:71)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947)
at org.eclipse.swt.widgets.Tree.CDDS_ITEMPOSTPAINT(Tree.java:858)
at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:6883)
at org.eclipse.swt.widgets.Control.wmNotify(Control.java:4589)
at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1590)
at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:4226)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3726)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4422)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2223)
at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1541)
at org.eclipse.swt.widgets.Tree.WM_PAINT(Tree.java:6280)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3727)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5368)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4422)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2309)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3351)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:515)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455)
at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
at org.eclipse.equinox.launcher.Main.main(Main.java:1169)
Comment 9 Darin Wright CLA 2007-09-10 10:03:51 EDT
Created attachment 77983 [details]
shot of empty JRE
Comment 10 Darin Wright CLA 2007-09-10 10:11:10 EDT
Logged bug 202792 for problem with label provider.
Comment 11 Leo Lipelis CLA 2008-02-05 19:18:25 EST
I'm seeing the same behavior for Tomcat's Runtime Libraries which seem to randomly disappear from time to time.  They don't just disappear from the UI, but from the build path as well, which results in the project failing to build.  So far I can get around it by closing the project and all editors and restarting Eclipse, and then reopening the project.

The presence of this bug makes Eclipse 3.3.x to be the worst release so far, for me, in terms of quality and day to day experience.
Comment 12 Darin Wright CLA 2008-02-05 21:53:43 EST
Are the Tomcat libraries added as one user library? If so, that might be a dup of a different bug in JCore - bug 152926.
Comment 13 Jerome Lanneluc CLA 2008-02-06 05:05:17 EST
(In reply to comment #12)
> Are the Tomcat libraries added as one user library? If so, that might be a dup
> of a different bug in JCore - bug 152926.
Actually bug 152926 describes a slightly different problem: jars are on the build path but they appear empty. Here it looks like the jars are not on the build path.

Comment 14 Leo Lipelis CLA 2008-02-06 17:41:07 EST
(In reply to comment #12)
> Are the Tomcat libraries added as one user library? If so, that might be a dup
> of a different bug in JCore - bug 152926.
> 

Darin,

Ultimately it may or may not be the same bug.  It just seems that there are a number of places where things "disappear", like disappearing classes inside the JARs, disappearing entire libraries, disappearing main project classes in JEE perspective, and all of this "disappearing" behavior is introduced in fairly recent builds.  It may be a coincidence and maybe it is a bunch of separate bugs.  It may all be one bug.

From the user point of view, which is the perspective I am using at the moment, it looks like my symptom is closest to what's described here than to what's described in the bug 152926.

I'm using the latest wide release (non-beta) JEE build/distribution of Eclipse.  So, the tomcat runtime library is something that WTP plugin adds automatically for all "dynamic web" Java projects.  It's not something that I add manually.

I've been using Eclipse for a long time (since 2.0 days) and I tend to upgrade as soon as the new release is out.  This disappearing behavior is something very new in my experience.
Comment 15 Darin Wright CLA 2009-06-05 12:27:21 EDT
Does anyone know if this is still a problem? There has not been any action on this bug for a while.
Comment 16 Eclipse Genie CLA 2020-02-29 07:10:11 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.