Community
Participate
Working Groups
Hi, I have 6 projects one depending on the other and each depending on some libs. I have setup lib export and project dependency correctly. Eclipse compiles all projects without any errors on most days. But on every 5th or 6th day, the same project group reports compilation errors stating that some of the types are missing. Nothing has changed as far as the dependency is concerned; none of the libs have been removed or the project exports changed. As part of my investigation I just remove and add any arbitrary lib from any of the project ( just to trigger a rebuild ) and the whole project compiles successfuly. Again after 3 to 4 days it reports types are missing ? After much frustration I added access rules to each sub project making all classes "**" "Accessible" and the problem seems to have gone away until today. Now I have added "**" "Accessible" to all the libs - not sure how long this will help me. I will add futher to this bug. The compiler must be consistent with the problems reported. Project compiles perfectly with ant.
A resource change on the disk also seems to trigger this. For example the project was compiling fully just now. I replaced a png file on the hard disk. This triggered the "resource change" checking in Eclipse 3.1 IDE, and it started rebuilding. Now it reports a number of "classes not found" errors starting with this line as the first error: "The project was not built since its build path is incomplete. Cannot find the class file for javax.help.HelpSet. Fix the build path then try building this project" But when I trigger a full rebuild (just add and remove any arbit lib to trigger this) the project fully compiles !!!!!!!!! Please treat this bug as CRITICAL ... the full rebuild takes a lot of time. Cheers
Any chance we can get a hold of your workspace? If not, can you attach the .classpath & .project files for each project?
Created attachment 26175 [details] Zip file containing .classpath and .project files for each project As requested by you .classpath and .project files for each project have been zipped and attached
Another thing might be significant. All of my projects are outside of the "workbench" directory. By default eclipse attempts to create under the workbench; but in my case I created from existing source dirs. In case this helps. In any case the compiler must be consistent. Cheers.
Just an update on this. I had to trigger a rebuild again today, but I just noticed ( this was probably happening before) that some of my files continue to show error annotation for some of the libs (i.e. types) reported missing. Note that there are no errors in the Problems view and project runs and builds fine. Strange
Any progress on this ? How can I help ? Am I the only person having this problem ? I tried 3.2M2 - same problem. It seems to be something to do with how jar files are exported from one project to other and project dependency.
No we have not heard of this problem from anyone else. Suspect it has something to do with your setup. Are you running any Ant scripts to build parts of your projects?
Ant is not run for day to day development; only to build deployment jars. All projects and files are available to Eclipse. Javac is not used to compile the files via Ant so far anyway. I will investigate this further in the following weeks because we are going to start using JAXB and generate java files via ant. We intend to compile it with Eclipse. I understand that Eclipse uses it's own compiler.
It does appear that we are tracking a similar problem in bug 108450. We'll leave both PRs open for now to see if we can find a repeatable case, or at least get more details. When this happens again AND before you do anything to 'fix' it, can you please try a few things first: 1. Can you find the declaration of a type from the 'missing' jar file (assuming you have attached source)? 2. Can you create a new test project with a new class that extends a type from the 'missing' jar file? thx
Finally ... some body else has decided to report this problem. It was hard to believe something was wrong with my setup. Anyway, I got the problem again. This time it reported Jaxb libs missing. I created a new project. Associated the user lib Jaxb with this project. Implemented the "javax.xml.bind.ValidationEvent" in a class. Every thing compiles fine in this new project. My other projects continue to report jaxb types as missing. Please let me know what else I can do to help you fix this problem. Cheers and good will
A few more questions: - what happens if you close and then open your project, when it has the unresolved errors? Are they fixed after the open project? - are the missing jar files located inside your workspace, or outside in another directory?
- Closing and opening the projects has no impact. The auto build kicks in and seems to do some work ( progress bar and all ) but still shows compilation errors. - All my projects and library jars are outside the workspace. This problem is so annoying for us, I am happy to do a live chat to discuss this problem and let you remotely (via myself) manipulate my project settings. If you think it will help ofcourse.
Jerome, this one appears to be the same classpath problem as bug 108450
*** Bug 108450 has been marked as a duplicate of this bug. ***
For tracing this problem, can you please add a .options file (say in c:\temp\.options) 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 Then start eclipse with the following option: eclipse.exe -debug c:\temp\.options -vm <path to your jdk>\jre\bin\java.exe You should see some trace in the DOS console when it is building. Please copy/paste this trace here or in a bug report (against JDT/Core). Note this trace can be big, so you might want to first increase the size of the DOS console buffer.
Can you redirect the console output to a log file ? This would be different from the Error Log created by Eclipse I presume. I think JBuilder is able to do this, I am sure Eclipse can. Please tell me how ? Just a redirect on command line ? I doubt it. Further, you mention "starts building" in your comment - you mean when eclipse attempts to rebuild the projects ? Note that this happens inconsistently at the IDE's whim at the moment i.e I have not had the problem "reported in this bug" happening for the last 5 days. In any case I have done the console thing ,the command buffer size limit is 999 and I have set number of buffers to 10. I hope this works. I have not used the console for a while. I am using win xp. Cheers
Sorry I got it wrong. There is a screen buffer size under layout tab. That goes upt0 to 9999. Should be good enough ? I have changed it. It would be best if I can redirect this to a console.log.
Created attachment 29238 [details] console output Console output for eclipse startup with the debug switches you recommended. Note that I am yet to get the build problem described in this bug. I forced a rebuild, but that did not add any more info to the console.
I take back what I said in my last comment i.e "I forced a rebuild, but that did not add any more info to the console" It does add, but all the output looks the same and it has all now scrolled over 9999 lines. I get a lot "Fake Exceptions"; not sure what these are.
(In reply to comment #16) > Can you redirect the console output to a log file ? > This would be different from the Error Log created by Eclipse I presume. To redirect the output to a file, use this commmand line instead: <path to your jdk>\jre\bin\java.exe -classpath .\startup.jar org.eclipse.core.launcher.Main -debug c:\temp\.options > c:\temp\trace.txt > Further, you mention "starts building" in your comment - you mean when > eclipse attempts to rebuild the projects ? Sorry that was a copy/paste glitch. I meant when Eclipse starts up. > Note that this happens inconsistently at the > IDE's whim at the moment i.e I have not had the problem "reported in this bug" > happening for the last 5 days. Please run with tracing all the time. And report the trace only when you get the problem. Ensure that the trace file doesn't exist before you startup Eclipse.
(In reply to comment #18) > Created an attachment (id=29238) [edit] > console output > > Console output for eclipse startup with the debug switches you recommended. > Note that I am yet to get the build problem described in this bug. > I forced a rebuild, but that did not add any more info to the console. > I don't see anything wrong with this trace, but as I said earlier the trace is interesting only if you see the problem.
I tried the following cmd: "G:\Program Files\J2SE5.0_05\pubjre\bin\java.exe" -cp "D:\ProgramFiles\Eclipse-3.2M2-Lite\eclipse\startup.jar" org.eclipse.core.launcher.Main -debug D:\ProgramFiles\Eclipse-3.2M2-Lite\eclipse\.options > D:\ProgramFiles\Eclipse-3.2M2-Lite\console.log eclipse starts up, console still displayed, debug options are recognised but output not redirected to console.log am I missing something ?
I just tried it with the same VM and it worked for me: d:\jdk1.5.0\jre\bin\java.exe -cp d:\eclipse\sdk\eclipse\startup.jar org.eclipse.core.launcher.Main -debug d:\temp\.options > d:\temp\console.log d:\temp\.options has the content from comment 15. This created a console.log file in d:\temp. I was able to see the contents of .options once I exited Eclipse. More details: d:\jdk1.5.0\jre\bin\java.exe -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b03) Java HotSpot(TM) Client VM (build 1.5.0_05-b03, mixed mode) Eclipse build ID: I20051102-1600
I had it set as command line of a shortcut in XP. Does not work that way for some reason. Works fine from command prompt. Thanks
I got this problem today. Please find console.log attached. This is the Eclipse startup trace as suggested by Jerome. The Projects were fully compiling yesterday. Today they do not. The Problem view reports the following error: "The project was not built since its build path is incomplete. Cannot find the class file for junit.framework.TestCase. Fix the build path then try building this project FW" and similar msg for other projects using JUnit. It also reports the "import com.borland.jbcl" in many files. The type junit.framework.TestCase cannot be resolved. It is indirectly referenced from required .class files etc. All errors are for JUnit types and JBCL types. Note that each time this error occurs the library/type reported missing is not consistently the same it could have been any one of the libs. If I trigger a rebuild by removing/adding any lib it will rebuild fully without errors.
Created attachment 29832 [details] Console Log Trace Software configuration ---------------------------------------------------------------------- Windows XP Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519: Service Pack 2) ----------------------------------------------------------------------- java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode) --------------------------------------------------------------------- eclipse-platform-3.2M3-win32 eclipse-PDE-3.2M3 eclipse-JDT-3.2M3 xsd-runtime-2.1.0 emf-sdo-runtime-2.1.0 GEF-runtime-3.1 VE-runtime-1.1.0.1 wtp-1.0M8 subclipse-0.9.36 -------------------------------------------------------------------
Created attachment 30097 [details] debug console log I have the same problem but I only have one large project. If I do a clean build I always get the import and type not resolved problems. If I force an incremental build by changing the files reporting the errors it builds cleanly. So it appears to be a cycle problem. There are package cycles here although I could not reproduce the problem with a trivial example. I am attaching my debug output.
I should add I am using 3.2M3 - the same problem occurred when I reverted to M2
After rereading this bug report, my problem seems to be a bit different so I have raised bug 117302
(In reply to comment #26) > Created an attachment (id=29832) [edit] > Console Log Trace > > Software configuration > ---------------------------------------------------------------------- > Windows XP Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519: Service Pack 2) > ----------------------------------------------------------------------- > java version "1.5.0_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) > Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode) > --------------------------------------------------------------------- > eclipse-platform-3.2M3-win32 > eclipse-PDE-3.2M3 > eclipse-JDT-3.2M3 > xsd-runtime-2.1.0 > emf-sdo-runtime-2.1.0 > GEF-runtime-3.1 > VE-runtime-1.1.0.1 > wtp-1.0M8 > subclipse-0.9.36 > ------------------------------------------------------------------- I don't see anything wrong with this trace. However I noticed that your Jar files are on a network drive. This is not recommended as the network drive could go down and you would see this kind of problems. Did you try refreshing the project (from the Java perspective, File > Refresh) after you had these problems ?
All my jars are on this pc ? What are you inferring this from ? Can you paste part of the dump here ? Which jars are we talking about ? Further, my workbench is set on auto refresh - shouldn't that be enough ? (may be not for network jars ?) Cheers.
Jerome, did you look at my log by accident? All my files are on N: but this is just a share on my local hard disk anyway.
I actually looked at the log from comment 26 and I suspected that the H: drive was a network drive. If this is not the case, then the only explanation I have is that one of the non Eclipse SDK plugins (xsd, subeclipse, etc.) is interferring (we've seen that before). Without steps to reproduce, I don't see how we can debug this further.
I have a few disk partitions, that's all. I think this problem existed much before I started using Subclipse so we might rule that out. I understand it is hard to debug without being able to consistently reproduce. I must say the frequency has gone down since I started using 3.2 milestones prior to that it used to happen every 3rd day. At least I think it did. If I see a pattern I will comment. Jerome, thank you for your hard work so far. Cheers.
Please reopen when you have more information.
Problem continues through to 3.2M5. Almost once every week. I have switched off "Workspace/Refresh Automatically" that seems to have brought the frequency down. ------------------------------------------------------- Cheers and goodwill ----------------------------------------------------------------------- Configuration ---------------------------------------------------------------------- Intel Pentium III 448Mhz, 320 MB of RAM ---------------------------------------------------------------------- Windows XP Version 5.1 (Build 2600.xpsp_sp2_gdr.050301-1519: Service Pack 2) ---------------------------------------------------------------------- rh8 kernel 2.4.18-14 ----------------------------------------------------------------------- java version "1.5.0_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) --------------------------------------------------------------------- eclipse-platform-3.2M5-win32 eclipse-PDE-3.2M5 eclipse-JDT-3.2M5 xsd-runtime-2.2.0M4 emf-sdo-runtime-2.2.0M4 GEF-runtime-3.2M4 JEM-runtime-1.2M1 wtp-1.5M4 subclipse-0.9.106 -----------------------------------------------------------
This starts again to happen since I switched from 3.1.2 to 3.2M6. Before it worked for quite a while without problems - I almost forgot about it. Here we are again...
I wonder if bug 117302 is related. I can hack the jdt compiler to get around that problem. It might be interesting to try the same hack (increasing MAX_AT_ONCE) variable and see if it solves your problem.
(In reply to comment #38) > I wonder if bug 117302 is related. I can hack the jdt compiler to get around > that problem. It might be interesting to try the same hack (increasing > MAX_AT_ONCE) variable and see if it solves your problem. Hm, not necessarily. The files are already compiled (almoust all) before it starts to complain. I think sometimes this problems happens just after the start of Eclipse in the morning (In the eavning the day before everything was fine). But mostly after a CVS update.
Just an update. This problem continues through to 3.2.1. I am running everything on Java 6.0. Nothing else has changed. Still not able to produce it consistently.
It might be a long shot, but can you please try the patch as indicated in bug 154984 and report here if it helps.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.