Bug 257347 - The type java.lang.Object cannot be resolved
Summary: The type java.lang.Object cannot be resolved
Status: VERIFIED DUPLICATE of bug 232478
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4.2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-03 06:18 EST by Martin Vysny CLA
Modified: 2009-02-03 12:38 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Vysny CLA 2008-12-03 06:18:44 EST
This bug started to occur pretty frequently (probably) since I switched the VM Eclipse is running in from OpenJDK to JRockit. I am not sure if this is really the case though. The project VM is OpenJDK but Eclipse runs on JRockit.

Environment: 64bit linux 2.6.27 kernel, 64bit OpenJDK and JRockit, 64bit Eclipse 3.4.1 SDK linux gtk
Symptoms: several classes cannot be compiled because of missing java.lang.Object. When I try to verify contents of rt.jar (in the project's "JRE System Library" library container in Eclipse GUI) nothing is shown - the jar seems to be empty. rt.jar is available, both the path and rights are correct. Several restarts, clean/build seem to help. There is error in .log file:

!ENTRY org.eclipse.jdt.ui 4 10001 2008-12-03 11:18:12.150
!MESSAGE Internal Error
!STACK 1
Java Model Exception: Java Model Status [/usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar is not on its project's build path]
	at org.eclipse.jdt.internal.core.PackageFragmentRoot.getRawClasspathEntry(PackageFragmentRoot.java:553)
	at org.eclipse.jdt.internal.ui.actions.JarImportWizardAction.selectionChanged(JarImportWizardAction.java:89)
	at org.eclipse.jdt.internal.ui.actions.JarImportWizardAction.selectionChanged(JarImportWizardAction.java:107)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:880)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
	at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062)
	at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1138)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1168)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:227)
	at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:221)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:388)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
!SUBENTRY 1 org.eclipse.jdt.core 4 1006 2008-12-03 11:18:12.163
!MESSAGE /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar is not on its project's build path
Comment 1 Jerome Lanneluc CLA 2008-12-03 06:45:02 EST
Please see bug 255931 comment 12 and report here if this fixes the problem.
Comment 2 Martin Vysny CLA 2008-12-03 07:38:19 EST
Many thanks for your tip! My bad, I missed that other bug completely. Please feel free to mark this bug as duplicate of bug 255931. I'll test the patch and I'll let you know. Thanks again!
Comment 3 Jerome Lanneluc CLA 2008-12-03 09:25:50 EST
Since this kind of problem is hard to reproduce (i.e. I personally have never seen it), I prefer to wait for your feedback before marking it as a dup.
Comment 4 Jerome Lanneluc CLA 2008-12-12 10:00:06 EST
Martin, did the patch help?
Comment 5 Martin Vysny CLA 2008-12-15 04:21:21 EST
I am sorry I was at Devoxx last week so I didn't test it very thoroughly yet. It seems to work but I'd like to test some more - I'll post more at the end of this week if this is okay.
Comment 6 Martin Vysny CLA 2008-12-19 08:30:18 EST
I tested it for a week and the error did not occur. It seems that the fix from bug 255931 comment 12 did the trick. Thanks!
Comment 7 Jerome Lanneluc CLA 2008-12-22 06:14:54 EST
Thanks. Closing as a dup of bug 232478 then (since the patch was the fix for
bug 232478).



*** This bug has been marked as a duplicate of bug 232478 ***
Comment 8 Frederic Fusier CLA 2009-02-03 12:11:08 EST
Verified by users for 3.4.2
Comment 9 Frederic Fusier CLA 2009-02-03 12:38:42 EST
Verified by users for 3.4.2