IBM Support

ResourceException problems encountered while deleting resources raised when cleaning a project with a Java facet

Troubleshooting


Problem

When cleaning a project with the Java facet in IBM® Rational® Application Developer, for example Java project, Dynamic web project or EJB project, a ResourceException error might occur. This happens when the mentioned project is shared with IBM® Rational® ClearCase using the ClearCase Remote Client (CCRC). This technote describes the problem further and suggests a workaround.

Symptom

The following are symptoms of the problem:

  • The following error message is displayed:


    • ResourceException org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources

  • The file .copyarea.db is shown as view private in the output directory and source directory of your project (for example src and bin)
  • The .log file or Error Log view contains this exception:

      !MESSAGE JavaBuilder handling ImageBuilderInternalException while building: IV_AM
      !STACK 1
      org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
      at org.eclipse.core.internal.resources.Resource.delete(Unknown Source)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(Unknown Source)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(Unknown Source)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(Unknown Source)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source)
      at org.eclipse.core.internal.runtime.InternalPlatform.run(Unknown Source)
      at org.eclipse.core.runtime.Platform.run(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source)
      at org.eclipse.core.internal.runtime.InternalPlatform.run(Unknown Source)
      at org.eclipse.core.runtime.Platform.run(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown Source)
      at org.eclipse.core.internal.events.BuildManager.build(Unknown Source)
      at org.eclipse.core.internal.resources.Workspace.build(Unknown Source)
      at org.eclipse.ui.actions.GlobalBuildAction$1.run(Unknown Source)
      at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)

      [</code>]

Cause

ClearCase Remote Client uses the system file .copyarea.db to track the state of the files in the particular directory of the view.

In rare cases, this file can become visible in Rational Application Developer. During a project build, these system files get copied from the project source folder to the Java output folder.

During a Project > Clean..., Rational Application Developer will try to remove the files from the Java output folder since newly compiled files will be written there later.

When Rational Application Developer tries to remove the .copyarea.db file, it will fail, as ClearCase Remote Client still recognizes it as a special file and prevents its deletion.

Resolving The Problem

A workaround for the problem is to disable copying of the .copyarea.db file:

    1. Open Window > Preferences, choose the preference page Java > Compiler. Add the file name .copyarea.dbto the Filtered Resources list .
    2. Delete the output folder (specified in Project Properties of project > Java Build Path > Source > Default Output folder). This folder will get recreated when building the project.
    3. Rebuild your projects by calling Project > Clean

This issue is tracked by APAR PK52299 and got resolved in CCRC 7.1.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: IBM","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"6.0;6.0.0.1;6.0.1;6.0.1.1;6.0.1.2;7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8;7.5;7.5.1;7.5.2","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSYK2S","label":"Rational Software Architect Designer"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"ClearCase Integration","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"6.0;6.0.0.1;6.0.1;6.0.1.1;6.0.1.2;7.0;7.0.0.1;7.0.0.2;7.0.0.3;7.0.0.4;7.0.0.5;7.0.0.6;7.0.0.7;7.0.0.8","Edition":"All Editions","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
10 September 2020

UID

swg21316377