facebook

Renaming packages causes Eclipse Resources Error

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #262524 Reply

    Russ
    Member

    I have a Java Project where I place four source folders (java, src, test, j2ee) within it. I am using *java* and *test* source folders presently. Each of these directories have the same package structure. *a.b.c.d*. I discovered in the source code for Class A (located in *java** source folder) that I misspelled the the package name (case issue) for this class. I attempted to rename the package within the Package Explorer window. When I asked the tool to handle the renaming for me, I was given an error. Now, when I run the test from Class B (located in *test* source folder), it does not find the class (Class B) and gives me a NoClassDefintionException. Prior to the error, the tool was working correctly to a point it was locating Class B but was not able to locate Class A. When I go look at the error log for Eclipse I see this error:

    
    JavaBuilder handling ImageBuilderInternalException while building: TechConf
    
    
    org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: /TechConf/bin/com/integrallis/TechConf.
        at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:281)
        at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:29)
        at org.eclipse.core.internal.resources.Folder.create(Folder.java:88)
        at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.createFolder(AbstractImageBuilder.java:379)
        at org.eclipse.jdt.internal.core.builder.BatchImageBuilder$1.visit(BatchImageBuilder.java:112)
        at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:57)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:81)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
        at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:85)
        at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:126)
        at org.eclipse.core.internal.resources.Resource.accept(Resource.java:67)
        at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.addAllSourceFiles(BatchImageBuilder.java:91)
        at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:50)
        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.build(BuildManager.java:307)
        at org.eclipse.core.internal.resources.Project.build(Project.java:88)
        at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildProjects(LaunchConfigurationDelegate.java:397)
        at org.eclipse.debug.core.model.LaunchConfigurationDelegate.buildForLaunch(LaunchConfigurationDelegate.java:123)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:618)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:565)
        at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:754)
        at org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:944)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    

    Next, I went into the files for my project and renamed the package name manually, but I was still getting the same error. Thinking the project was corrupted, I removed the project from the tool and re-created the Java Project. From here, I imported the project back into the tool. I next removed the directory structure under the bin directory. I attempted to restart the test, but this failed.

    I am at a lost on what within the tool is causing the Eclipse error.

    Thank you for reading my post.

    Russ

    #262526

    Russ
    Member

    Just a point of clarification: When I realized manually modifing the package names caused a package collision, I renamed the package back to their original names. I was hoping this would put me back to the original error, but is has not.

    #262531

    Russ
    Member

    duh, the java, j2ee, test are not source folders, but folders included in the src forlder………

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Renaming packages causes Eclipse Resources Error

You must be logged in to post in the forum log in