Bug 92877

Summary: Java Builder produces no class files
Product: [Eclipse Project] JDT Reporter: Alan Gibson <alan.gibson>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Alan Gibson CLA 2005-04-27 03:36:11 EDT
I am experiencing an odd failure occasionally and seemingly randomly when using
the default Java Builder to compile source. All non .java files in source tree
are copied to 'default output folder'and the entire directory structure is also
recreated. However, absolutely no .java files are compiled into the output
folder (ie. no .class files appear). The log shows no errors.

Ive found no consistent way to produce this problem. It gives every appearance
of being annoyingly random.

Ive found no consistent way to fix this other than deleting and recreating the
entire project.

Log header:
eclipse.buildId=I20050401-1645
java.version=1.5.0-beta
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86
Comment 1 Philipe Mulet CLA 2005-04-27 10:04:52 EDT
First time I hear about such an issue. 
Does it occur when running Eclipse on a 1.4 JRE ? 1.5 JREs are still somewhat
unstable (e.g. our batch compiler runs fine on 1.4 VM, but crashes 1.5 runtimes).
Comment 2 Kent Johnson CLA 2005-04-27 11:57:18 EDT
So can you reproduce by repeating choosing 'Project->Clean...' ?

How many full builds do you need to do before it fails?

Are there any major errors attached to any of your projects?

Or does your project dependency graph have cycles in it?
Comment 3 Alan Gibson CLA 2005-04-27 19:45:12 EDT
Upon further investigation, there was an error in a class file. Apparently
failure occurs in a specific situation:

It fails to compile if one of your classes extends a class that has a dependency
that is not in the classpath.

I had one class X that extends another class Y that needs a dependency Z that
was not in the classpath. I added the needed jar containing the class Z
and compilation started working again.

Compilation works with any other sort of existing error.
Comment 4 Kent Johnson CLA 2005-04-28 04:35:49 EDT
But in the case you had, we intentionally report a major build error against 
the project to avoid creating hundreds, if not thousands of errors. In 
numerous cases, its not just 1 class that is missing but quite a few from the 
same jar file.

Fixing the classpath is a straight forward thing for the user to do and needs 
to be done for the code to compile. By only creating 1 error in this case, we 
focus the user on what needs to be fixed so the project can be built.

You should always double check the errors on your project if the build does 
not succeed.