Community
Participate
Working Groups
Sometimes when I start Eclipse it seems to have problems with some jars in user libraries. Its as if the jars are empty. Nothing has changed since it worked last session and manual inspection shows the paths are correct. I have tried refreshing the project, rebuilding the project, closing and opening the project and closing and opening eclipse - all to no avail. The way to solve it is to edit the library definition in preferences, remove the offending jar(s) and re-add them - then it all works again. Its not all jars and it seems random but come to think of it - it could be the same few jars re-offending. Rather then remove and add I have tried editing the jar within the library definition and selecting the same jar again at which point it removes the jar from the library definition as if I had chosen remove. I will add some snapshots to show I am not imagining it.
Created attachment 47455 [details] Before workaround
Created attachment 47456 [details] After workaround
I just fired up Eclipse and had the problem with some jars. This time I closed Eclipse, opened it again and rebuilt all projects and the jars are now fine.
What is your exact build ID? Is there anything in the .log file?
eclipse.buildId=M20060629-1905 but I had the same symptoms on variopus 3.1 incarnations too. Nothing in the log file to help. I'm trying to find out the circumstances in which it happens. It seems more likely, but not guaranteed, to happen when I reboot windows with eclipse open (have just tried this several times). The eclipse 'saving workspace' dialog box flashes up but I'm not convinced it has enough tome to finish. Anyway, when loading eclipse after the machine has restarted I am likely to get broken jars but its not consistent (5 just now which took 5 minutes to fix by removing and adding to the user libraries). However, just now after reboot, eclipse started and did some building (no prompting from me - auto build is on but nothing has changed so don't know why it did that) and all was OK. I did a rebuild of all projects and I now have broken jars again. Maybe that gives you some clues?
Created attachment 47666 [details] Same library with broken jar on one project - fine on other. Oh well. I just double checked if the reboot thing really has anything to do with it and it seems now. So without reboots I refresh and rebuild all projects and its all fine. I shut eclipse and open and all fine. Shutdown and open again and all fine. Refresh and then build all and roughly the same 5 or 6 jars are broken. Same ones out of say tens I am using. In one project it had apache commons beanutils, cli and lang libraries each with broken jars in. I fxed one of them and the others in that project are now miraculously OK. And I just noticed - lang is now working on most projects but on one it is empty - same library but with empty jar on one project and working jar on others - see the attachment.
Same for me in Eclipse 3.3 build I20070327-0800. It doesn't occur every time I launch Eclipse, but maybe once or twice a day... The workaround for me is to close Eclipse and relaunch it. I always close Eclipse cleanly on evening, but when I relaunch Eclipse in the morning, it often starts with this problem... I don't reboot my PC, so I think it has nothing to do with reboot. Maybe more a problem when closing Eclipse. Nothing in the log file.
Could you please enable some tracing as follows to help us understand what's going on ? 1. Create a .options file with the following content: # Turn on debug tracing for org.eclipse.jdt.core plugin org.eclipse.jdt.core/debug=true # Reports classpath variable initialization, and classpath container resolution org.eclipse.jdt.core/debug/cpresolution=true 2. Start eclipse with the following command: eclipse.exe -debug <path to your .options file> -vm <path to java.exe> e.g. eclipse.exe -debug c:\temp\.options -vm c:\jdk1.5.0\bin\java.exe => this should open a DOS console 3. Ensure that the DOS console buffer size is as big as possible (Properties > Layout > Screen Buffer Size > set width and height to 9999) 4. When the problem occurs, copy/paste the content of the DOS console into a file, and attach the file to this bug
We are currently using Version: 3.2.2, Build id: M20070212-1330 with the latest WTP installed. We don't seem to be getting the problem at the moment so I can't help with extra info. If we get it again then I will do as you request.
Created attachment 64777 [details] Debug log capture I am seeing this problem as described. It seems to happen on a somewhat regular basis when I start eclipse. I have a project I am currently working on, and when launching Eclipse, random User Libraries appear empty as describe by original poster. I can usually correct the problem by just closing and re-opening the project. The Eclipse version as reported is Version: 3.2.2.r322_v20070104-R4CR0Znkvtfjv9- Build id: M20070212-1330. This is running under Windows XP SP2. This instance is installed and used along with MyEclipse (Version: 5.1.1 GA Build id: 20070302-5.1.1-GA). I tried the instructions as documented by Jerome Lanneluc (https://bugs.eclipse.org/bugs/show_bug.cgi?id=152926#c8), but the console size is too small to hold all of the output, but does log "CPContainer INIT - FAILED (initializer did not initialize container)" messages for some of the class libraries which appeared empty when I launched Eclipse with the debug option. I will attach the partial log I captured. If a full debug log is required, I will need more instructions on how to capture more of the output.
For people using 3.2.2 (Matthew, Ernest), could you please try the patch in bug 154984 comment 52 and let me know if this fixes the problem ? For people using a 3.3 build (Gilles), could you please enable the tracing as described in comment 8 and attach it to this bug when the problem occurs ?
(In reply to comment #11) > For people using 3.2.2 (Matthew, Ernest), could you please try the patch in bug > 154984 comment 52 and let me know if this fixes the problem ? > > For people using a 3.3 build (Gilles), could you please enable the tracing as > described in comment 8 and attach it to this bug when the problem occurs ? > I have installed the updated JDT Core jar file and will run with it for a while to see if the failure occurs. Thanks for the response.
I have been starting Eclipse at least three or four times a day since April 26 and have not had this problem occur, until this morning. I started Eclipse and the status bar showed the "Building workspace" message, I saw the errors associated with the user defined libraries not being found. I had copied the org.eclipse.jdt.core_3.2.3.z20070319-1931.jar file into my Eclipse plugin directory, having renamed the original org.eclipse.jdt.core_3.2.3.v_686_R32x.jar to org.eclipse.jdt.core_3.2.3.v_686_R32x.jar.original.
(In reply to comment #13) > I saw the errors associated with the user defined libraries not being found. Could you please attach the trace as described in comment 8 ?
I have been launching Eclipse without the procedure outlined in comment #8, but will start using that procedure every time. The next time the problem occurs, I will attach the log. As I previously mentioned, the console output appears to scroll off the top of the buffer when I last got the log, even though I set the rows/columns to max values. I will try the technique specified in this article http://www-128.ibm.com/developerworks/rational/library/06/0221_rossner/#N10153.
Created attachment 66721 [details] Debug log capture - 2 I had the problem occur again. This time, it was only one user defined library that appears to have been 'lost'. The library was called defined as "itext-1.4.1". When the problem occurred, the actual user library definition was missing from the list at Window -> Preferences -> Java -> Build Path -> User Libraries. I checked the file .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs in my workspace to check that the definition was still there, and it was. I have attached the debug log.
I have the exact problem as described above - mine seems to be repeatable on demand. I've narrowed it down somewhat. It only seems to happen when I open Eclipse with 2 different projects open. (They have different JRE's - wonder if that contributes to the problem?) In the attached log project 'Adv Ret Planner' is the one that encounters the error with the User Library 'NetscapeJavascript' containing a single jar file 'C:/JavaLibs/netscape/netscape.jar'. Here is the sequence of events: with Eclipse running, I fix the problems from before and run the project (an applet) to make sure all is OK. Shutdown Eclipse Restart Eclipse Make a change to one of the files in the project. Attempt to run the project - get the errors that the various classes in that JAR file cannot be resolved. The attached log is from this occurrence.
Created attachment 71626 [details] debug log for failure comment 17
*** Bug 110115 has been marked as a duplicate of this bug. ***
Mitch, are you running with the patch from bug 154984 comment 52 ?
(In reply to comment #20) > Mitch, are you running with the patch from bug 154984 comment 52 ? > For 3.2.x users, the URL of the patch has changed (the fix for bug 154984 is still the same). It is now available at http://www.eclipse.org/jdt/core/r3.2/index.php#UPDATES
I downloaded 3.3 last week and installed and started using it. In the past 3 days, I have had this problem occur twice. Is there an update for Eclipse 3.3?
(In reply to comment #22) > I downloaded 3.3 last week and installed and started using it. In the past 3 > days, I have had this problem occur twice. > > Is there an update for Eclipse 3.3? > Sorry Ernest, we are still trying to figure out what's wrong. The trace you attached from 3.2 did not help. However the tracing changed in 3.3. So could you please attach a new trace when the problem occurs using 3.3 ?
*** Bug 199599 has been marked as a duplicate of this bug. ***
I saw the same problem. It occurred after my PC had been shut down without closing Eclipse first. After looking at the MyEclipse-forum (http://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&p=83288#83288) I tried starting with the -clean option. This worked, all my user libraries were back. Cheers, Bas
(In reply to comment #25) Bas, could you please indicate the Eclipse build ID you were using ?
(In reply to comment #26) > (In reply to comment #25) > Bas, could you please indicate the Eclipse build ID you were using ? > I'm using Eclipse build ID Build id: 6.0.0-GA-200708
(In reply to comment #27) > (In reply to comment #26) > > (In reply to comment #25) > > Bas, could you please indicate the Eclipse build ID you were using ? > > > > I'm using Eclipse build ID Build id: 6.0.0-GA-200708 > Sorry, that's the Myeclipse id... the JDT build id = I20070625-1500
(In reply to comment #28) > the JDT build id = I20070625-1500 Thanks. Could you please either try http://www.eclipse.org/jdt/core/r3.3/index.php#UPDATES, or 3.3.1 (coming soon) ? And let us know if this fixes the problem ?
I downloaded the patch jar and copied it in mu $ECLIPSE_HOME/eclipse/plugins directory. After that I killed the eclipse and java task (simulating a computer shutdown) and started eclipse again, and the libraries were there. Strangely though, imports from now existing libraries (In my case jakarta commons http-client) are not found by the compiler. After cleaning the project, the compiler can find the library and thus the imports. In the 'about' box of eclipse, it indicates that the Java Development Tools core has version 3.3.1.z20070824-1334 so it seems to have taken up the new plugin. So it seems to help at least somewhat. Cheers, Bas
(In reply to comment #30) > After that I killed the eclipse and java task (simulating a computer shutdown) > and started eclipse again, and the libraries were there. Strangely though, > imports from now existing libraries (In my case jakarta commons http-client) > are not found by the compiler. After cleaning the project, the compiler can > find the library and thus the imports. Can you reproduce this behavior? Or did it happen only once? If you can reproduce, can you please enter a separate bug report with enough details so that I can reproduce it on my machine and debug it?
Our shop has the same problem, using IBM products (WDSCi 6.0.x and 7.0.x) based on Eclipse 3.x. We're going to try the workarounds listed here to see if they help.
*** Bug 215652 has been marked as a duplicate of this bug. ***
Not able to find the JSP plugin for Eclispe3.3.
any update on this...??
(In reply to comment #35) > any update on this...?? > Are you seeing this problem as well? In this case we would need a debug trace (please see comment 8). Also what is the Eclipse build id?
I just came across this in the 3.5M4 candidate (I0081210-0100). Everything OK...then for no apparent reason almost every project showed errors that could basically be tracked back to one general error "Cannot find class file for java.lang.Object". Clean/rebuild and Shutdown/restart were no help, I've switched back to I20081202-1812 in order to keep working.
(In reply to comment #37) > I just came across this in the 3.5M4 candidate (I0081210-0100). > > Everything OK...then for no apparent reason almost every project showed errors > that could basically be tracked back to one general error "Cannot find class > file for java.lang.Object". > > Clean/rebuild and Shutdown/restart were no help, I've switched back to > I20081202-1812 in order to keep working. > It looks like a different problem than reported in comment 0. Comment 0 talk about empty jars. You seem to have another symptom: "Cannot find class file for java.lang.Object". Please enter a separate bug report.
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. If you have further information on the current state of the bug, please add it. 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.