Community
Participate
Working Groups
Build ID: M20060629-1905 Steps To Reproduce: 1. Create a java class in eclipse 2. Rename the class so that the only change is in the case of one or more letters More information: I believe that since windows file names are not case sensitive, eclipse is renaming the file to a name that windows thinks is the same, resulting in an error. I circumvent the bug by changing the case and adding a letter, then changing the case again.
I cannot reproduce this error in Version: 3.3.0, Build id: I20060810-1230.
We experienced this problem as well (3.2.1). In a distributed project we crashed all installations which we all had to recover manually by cleaning everything afterward! Including our external project partners :-( (We are using subversion, committed the renamed file, after refreshing the problem appeared on all installations - thus the workaround does not work)
Passing to JDT for comment.
Did you use refactor rename in the package explorer or normal rename in the navigator?
If I remember correctly: renamed in the code (an inner class). Comitting and updating on other machines caused the failure there as well
Renamed in the code using 'refactor rename', or just with typing and saving? Can you check what's in the .log?
Cannot remember how I renamed the class. Most likely by typing in the code (renamed inner class only used within the outer class). Entry in the log file: !ENTRY org.eclipse.jdt.core 4 4 2007-04-10 10:49:21.281 !MESSAGE JavaBuilder handling CoreException !STACK 1 org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: /core/bin/james/core/util/graph/trees/RedBlackTree$node.class. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:281) at org.eclipse.core.internal.resources.File.create(File.java:109) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.writeClassFileBytes(AbstractImageBuilder.java:671) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.writeClassFile(AbstractImageBuilder.java:651) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.acceptResult(AbstractImageBuilder.java:181) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:300) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:213) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:237) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:59) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:249) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:169) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) !SUBENTRY 1 org.eclipse.core.resources 4 275 2007-04-10 10:49:21.281 !MESSAGE A resource exists with a different case: /core/bin/james/core/util/graph/trees/RedBlackTree$node.class.
Moving to jdt.core.
Please reopen with a reproduceable testcase. I've tried all combinations I can think of & they work fine. The walkback from comment #7 is from a full build & not a normal incremental build from a simple source change.
We made a full rebuild (after what I presented in Comment 7)! More than once - not relying on the internal compiler. Cleaned everything. By using Clean from the menu as well as deleting the compiled files from the disc. Nothing worked - at least for several "rebuild rounds". And it failed on more than one computer ...
What do you mean "not relying on the internal compiler" ? Do you have any Ant scripts writing .class files to the output folder that could collide with your normal source files ?
Sorry - "not using" the incremental compilation. Cleaned everything (by menu and manually) - still using the internal compiler but on a a clear build path. --- snip --- Just checked it again: Renanmed the inner class Node to node (by using context menu refactoring on Node in the source editor). Afterwards cleaned and rebuilded everything by using the clean all projects. The color of the error mark is red (but filled) - thus it seems as if the problem has been solved - but trying to execute something from the project terminates with "unresolved compilation problem". Tried to reproduce the problem with a simple class but there everything seems to work. The project the file the change has been applied to is pretty large - we have about 68 open projects in the IDE (whereby we had this problem as well on machines having less projects - around 10). All projects with enabled subclipse support. All projects are compiled into one build path (Thus "scrub output folders" is deactived) - that's the reason why I removed the class files manually - but this did not change anything. The sad thing is that we had the problem on other machines as well (update by external svn client, using refresh in eclipse afterward). Here the error log entry of today: eclipse.buildId=M20060629-1905 java.version=1.6.0-beta2 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -os win32 -ws win32 -arch x86 Error Wed May 09 21:31:05 CEST 2007 JavaBuilder handling CoreException org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: /core/bin/james/core/util/graph/trees/RedBlackTree$Node.class. at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:281) at org.eclipse.core.internal.resources.File.create(File.java:109) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.writeClassFileBytes(AbstractImageBuilder.java:671) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.writeClassFile(AbstractImageBuilder.java:651) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.acceptResult(AbstractImageBuilder.java:181) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:417) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:300) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:213) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:237) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:59) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:249) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:169) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Then you really do have a .class file collision. > "All projects are compiled into one build path" If all of your projects are compiling into a single output folder & a full build after you've cleaned the output folder produces this error THEN you have a collision with this type. Please look for all implementors RedBlackTree. I suspect you'll find more than one & they're both trying to define a member type named Node/node.
No - that's not true. There is only ONE implementor. I was able to reproduce this behaviour in the meantime by defining a new project with an own build path (do not scrub output folder). Sadly I'm very short on time and have not directly written down the steps I have undertaken but if I remember them correctly: turning off scrub output folder and cleaning afterward caused the problem. Maybe Eclipse does not automatically remove generated class files of renamed files? Maybe because of "do not scrub"? Complete content of the one and only file of the project which is compiled into the default build path of a new project: public class TstIt { private class Node { } } Thus it has definetly nothing to do with our project. It's just a reproducable and annoying Eclipse bug.
Reproduced with a simple case. Do not need to do a Clean (which is a no-op if "Scrub output folders" is disabled). And the test class can be a simple type such as: class Xx {} -> class XX {}
Created attachment 66908 [details] Proposed patch
Released into HEAD for 3.3RC1 Added DependencyTests.testCaseInvariantType
Patch looks good to me.
Verified for 3.3RC1 using I20070515-0010