Community
Participate
Working Groups
Hi, a bit of searching on the web reveals this is a common problem but alas the usual fix (adding a JRE to the build path) do not work. I'm using Eclipse 3.4 with a number of related projects in my workspace. Each of these projects has on its build path the JRE System Library jdk1.5.0_11. Occasionally on a rebuild I will get the following error; "The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files" plus other similar errors (can't find class x where x should be in the JRE System Library). A refresh / clean / rebuild more often that not fixes the problem but this is a time consuming process and one I'd rather not repeat often. Regards, John
Sorry but we're going to need a lot more information. When your project's buildpath is incomplete, this is the error that's reported. Has your project ever built successfully? If so, what's changed since then? New/changed jars?
(In reply to comment #1) > Sorry but we're going to need a lot more information. > > When your project's buildpath is incomplete, this is the error that's reported. > > Has your project ever built successfully? If so, what's changed since then? > New/changed jars? > The projects in the workspace have always built successfully. This bug rears it's head every now and then sometimes upon startup of eclipse (with Build automatically checked) and sometimes when we ask eclipse to build the workspace. The build path has changed on occasion but each time we've changed it we've got it to build.
Is it always Object that you cannot find ? Would mean we cannot find rt.jar "The build path has changed on occasion but each time we've changed it we've got it to build." What do you do to get it to build ? Does a simple restart work ? How many people on your team experience similar problems ? We'll need to know which steps cause the workspace to work again AND which steps do NOT appear to make a difference. Basically without anyway to reproduce this, we'll need everyone on your team to help find what may be causing the random failures. To track this down, people cannot ignore it or do X/Y/Z to get around it.
I have the same problem. Here's how it manifests itself for me (please pick relevant information): - Seems to happen randomly on startup - Seen it on Windows, Linux and OS X - To get around the error I have to trick Eclipse into believing the ".classpath" file has changed for every affected project in the workspace (I do that usually by entering some character, deleting it again, and then saving). - Cleaning the projects does not help - I have quite a quite a number of projects in my workspace - I have multiple windows open - My Eclipse is from the Eclipse Classic download with XML editors installed via "Software Updates" - I don't remember having seen this in Eclipse 3.x
Hi all I'm also struggling with this problem on a daily basis. When starting up Eclipse I get thousands of compiler errors because java.lang.Object and java.lang.Enum are reported to be inexistent. These are the setups where I (and my team members) encountered this behavior: - Windows 2000 and Windows Vista SP1 - Eclipse 3.4 and 3.4.1 - JRE/JDK 1.6.0_07 and 1.6.0._10 - Workspace containing 40+ Maven2-generated Eclipse projects (most of the projects have the compiler compliance level set to "1.5". A few of them are set to "1.4" or "1.6") - Eclipse plugin for IBM ClearCase version control integration Refreshing and cleaning the workspace are to no avail. Up to now I only figured out one workaround that works reliably: - In Eclipse go to "Windows" -> "Preferences" -> "Java" -> "Installed JREs". - Select the currently active JRE/JDK and press the "Edit" button. - Select the "rt.jar" and change its position in the list of "JRE system libraries" (e.g. press the "Up" button once). - Confirm all changes, clean and rebuild the workspace. Then the next time I would face the problem I would reposition the rt.jar again (or reset the order by pressing the "Restore Default" button). Greets, Oliver
This feels reminiscent of timing issues we had during our classpath computation (see bug 232478). We will need steps to reproduce. There are also traces to activate to find out what occurred. Jerome - could you pls engage here ?
Talking to Jerome, this really feels the same as bug 232478. I think we should backport the fix attempt to 3.4.2 since others are seeing the problem as well (not just me and Dani).
John, Elfi & Oliver - if we did provide you with a patch to try on top of 3.4.1, would you able to test it ? (assuming this is the same issue as for bug 232478)
Sure. Just tell me what to do.
@Philippe: Yes, I will gladly test the patch.
(In reply to comment #8) > John, Elfi & Oliver - if we did provide you with a patch to try on top of > 3.4.1, would you able to test it ? (assuming this is the same issue as for bug > 232478) > Yes I'll test this if you provide patch and instructions on how to install. Thanks, John
A patch for 3.4.1 is available at http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_fix255931.jar. To install: 1. Shut down Eclipse 2. Rename eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar to eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar.disabled 3. Download org.eclipse.jdt.core_fix255931.jar (from link above) to eclipse/plugins 4. Rename eclipse/plugins/org.eclipse.jdt.core_fix255931.jar to eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar 5. Restart Eclipse Please let us know if this fixes your problem.
Thank you very much for your support. The patch really seems to do the trick: I've applied it today and not a single compilation error showed up after restarting Eclipse. I'm giving out the patch to some of my colleagues now hoping it will fix their problems as well. I'll report back how it worked out. Greets, Oliver
(In reply to comment #12) > A patch for 3.4.1 is available at > http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_fix255931.jar. > > To install: > 1. Shut down Eclipse > 2. Rename eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar > to eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar.disabled > 3. Download org.eclipse.jdt.core_fix255931.jar (from link above) to > eclipse/plugins > 4. Rename eclipse/plugins/org.eclipse.jdt.core_fix255931.jar > to eclipse/plugins/org.eclipse.jdt.core_3.4.2.v_883_R34x.jar > 5. Restart Eclipse > > Please let us know if this fixes your problem. > > I've given the patch a run today and I haven't had any issues. I tried restarting eclipse, doing a refresh, clean, rebuild cycle, running the various configurations for my projects. Also did the normal job of editing code and seeing how it compiled etc. One problem I have had is running eclipse with -clean. This seems to remove the Java preferences and the Java and Java Browsing perspective. If I do this then I need to store the old org.eclipse.jdt.core_3.4.2.v_883_R34x.jar before going back to the patch (it works in both directions I've noticed). I'd say it is too early to say the issue is resolved but a week without any issue would be enough. I've sent the instructions out to my team to see if it helps any of them who've had this problem.
Thanks for the feedback so far. I'll wait a week before declaring success. John, for the -clean problem, I believe that is expected. Replacing org.eclipse.jdt.core_3.4.2.v_883_R34x.jar with another version is not really supported by the install code. But this is the only way we can provide a patch in 3.4.x. So I would suggest to not use -clean. (BTW -clean is believed to be magic and cure any diseases, but this is not true :-) )
(In reply to comment #15) > Thanks for the feedback so far. I'll wait a week before declaring success. > > John, for the -clean problem, I believe that is expected. Replacing > org.eclipse.jdt.core_3.4.2.v_883_R34x.jar with another version is not really > supported by the install code. But this is the only way we can provide a patch > in 3.4.x. So I would suggest to not use -clean. (BTW -clean is believed to be > magic and cure any diseases, but this is not true :-) ) > (In reply to comment #15) > Thanks for the feedback so far. I'll wait a week before declaring success. > > John, for the -clean problem, I believe that is expected. Replacing > org.eclipse.jdt.core_3.4.2.v_883_R34x.jar with another version is not really > supported by the install code. But this is the only way we can provide a patch > in 3.4.x. So I would suggest to not use -clean. (BTW -clean is believed to be > magic and cure any diseases, but this is not true :-) ) > Re: the -clean problem. I thought that might be the case but best to check. I'll continue testing the patch in the normal manner.
I admit I haven't been as diligent in testing as John, but I haven't seen that kind of build path problems either since installing the patch.
Can I assume that this silence means that the patch fixed the problem for everyone?
(In reply to comment #18) > Can I assume that this silence means that the patch fixed the problem for > everyone? > Yes I'm happy the issue is resolved. When can I expect to see it wrapped in a formal patch? What will the build number be?
The patch is released for inclusion in 3.4.2, and already in 3.5 stream (e.g. if you grab 3.5M4, you are all set).
(In reply to comment #20) > The patch is released for inclusion in 3.4.2, and already in 3.5 stream (e.g. > if you grab 3.5M4, you are all set). > Thanks
(In reply to comment #18) > Can I assume that this silence means that the patch fixed the problem for > everyone? > Yes, Eclipse works like a charm now.
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 ***
Verified by users for 3.4.2
*** Bug 267045 has been marked as a duplicate of this bug. ***
I am unable to get the patch from below link.it shows me "404 File not found" error on screen. http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_fix255931.jar. Please help me how to get above patch or any eclipse version which has the above patch . Any help would be highly appreciated.
I am using Eclipse Luna with JDK1.8 and my source code compiler level is 1.8.
facing below issue while i am using Eclipse Luna with JDK1.8 and my source code compiler level is 1.8. Generated servlet error: The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files