Bug 292128 - Project doesn't build due to a problem while deleting bin directory
Summary: Project doesn't build due to a problem while deleting bin directory
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 minor with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-10-13 05:43 EDT by Fabien Charlet CLA
Modified: 2022-06-23 09:19 EDT (History)
13 users (show)

See Also:


Attachments
The following error displayed on delecting project from Project Explorer Error message:The project was not built due to "Could not delete '/POC/bin/SeleniumWD'.". Fix the problem, then try refreshing this project and building it since it may be inconsi (190.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-09-05 06:19 EDT, Sujana DV CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Charlet CLA 2009-10-13 05:43:16 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: Build id: 20090920-1017

Since I move to Eclipse 3.5, sometimes when I update a library in a project, Eclipse complains that it can't delete the bin directory.

Here is the complete message :

The project was not built due to "Could not delete '/IsisV2/bin/res'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent

Sometimes when I refresh the project, the compilation starts, sometimes I must delete the directory in navigator view (where there is no problem to delete the directory).
I have a colleague that also moves from 3.4 to 3.5 and the same problem appears. He works on the same project.

Sometimes Ant tasks launched from Eclipse also fail to delete directories. 
I have no file explorer launched in those directories.

The -clean option didn't changed anything.

I searched the bugs but I didn't find a similar problem reported recently.

Reproducible: Sometimes

Steps to Reproduce:
1.Update a library in a Java project
2.Sometimes the project can't be built.
Comment 1 Remy Suen CLA 2009-10-13 07:59:46 EDT
What do you mean by "update"? You replace x.jar with an identically x.jar that is of another version? You alter the project's build path through the user interface to point from x-1.2.3.jar to x-1.2.4.jar?
Comment 2 Fabien Charlet CLA 2009-10-13 08:41:52 EDT
No matter what modification is done.
In my case, I replace a jar file by another file (with the same name).

When Eclipse detects that the jar is modified, it launches the comilation of the workspace. But when I change project build path, I have the same problem.
Comment 3 Dani Megert CLA 2009-10-19 06:43:18 EDT
Maybe something (Ant task?) is touching your files outside Eclipse?

>Steps to Reproduce:
>1.Update a library in a Java project
>2.Sometimes the project can't be built.
This works fine for me. We need more detailed steps.
Comment 4 Olivier Thomann CLA 2009-11-26 13:12:58 EST
Are you sure that the file in the bin folder are in sync before you start the compilation ?
Comment 5 Chris Simmons CLA 2013-10-08 03:36:19 EDT
I see what sounds like the same problem with eclipse 3.7.2.  It happens quite often when I update on my Windows 7 VM (using subclipse 1.6.18) but never on linux.  I'm pretty sure that they're not running an ant build or otherwise modifying stuff in the background.

That's probably not very helpful but its all the information I've got I'm afraid.  In my experience this kind of thing is often caused by no closing an output stream which on Windows will prevent the directory from being deleted (but on linux you get away with it).
Comment 6 Nicholas Karwath CLA 2013-10-08 09:23:00 EDT
Same here, it happens sometimes after i (re)start the IDE. The Workbench was cleanly shutdown via File->Exit. Workspace settings were saved. There were no external changes on the bin folders between shutdown and starting points.

My workspace is quite large (~200 Projects) and at least one complete rebuild instead of using the saved build state every morning is annoying. I can't trace it back to a svn update operation.

Happens with Version: Indigo Service Release 2 Build id: 20120216-1857

If i can provide any more information, please let me know.

Log Entry:
Contains: Problems encountered while deleting files.
Contains: Could not delete: C:\Virtual Machines\Workspace\odis\branch.2.1.5\EfaMgmt\shared\bin\de\xxx\efamgmt.
Contains: Could not delete: C:\Virtual Machines\Workspace\odis\branch.2.1.5\EfaMgmt\shared\bin\de\xxx.
Contains: Could not delete: C:\Virtual Machines\Workspace\odis\branch.2.1.5\EfaMgmt\shared\bin\de\xxx.
Contains: Could not delete: C:\Virtual Machines\Workspace\odis\branch.2.1.5\EfaMgmt\shared\bin\de.
!SUBENTRY 1 org.eclipse.core.resources 4 273 2013-10-08 15:04:26.363
!MESSAGE Problems encountered while deleting resources.
!SUBENTRY 2 org.eclipse.core.resources 4 273 2013-10-08 15:04:26.363
!MESSAGE Could not delete '/EfaMgmt_shared/bin/de'.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources. at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:352)
Comment 7 Marcel Romijn CLA 2013-10-21 09:45:19 EDT
Well, even with Eclipse 4.3.1, this problem still exists. But according to a colleague, the cause on Windows 7 is the Windows Indexer/Windows  Search.
If you disable that, you won't get the error anymore.
Comment 8 Nicholas Karwath CLA 2013-11-01 09:10:20 EDT
I can confirm Marcels statement. This works for me.
Comment 9 Yura Shinkarev CLA 2013-12-29 17:18:02 EST
I have at my Win8 x64 disabled index/search service. But anyway get this error.
I don't update any libraries. Only start clean project and get error.
Comment 10 Marcel Romijn CLA 2014-03-04 09:32:47 EST
Well, so much for my colleagues remark about the Windows Indexer/Windows Search... :-(

But I do have more colleagues with more ideas, and one of them claims that it does not happen when the workspace and sources are located under the user folder.
I tried that and indeed it happens much less, but still it does happen occasionally.
Comment 11 Cyril Chene CLA 2014-03-11 04:15:49 EDT
For what it's worth, I had the problem on Win 7 and got rid of it by removing my worspace folder from the Windows Search Index.
Comment 12 Juergen Baier CLA 2015-05-20 03:37:29 EDT
Note: This problem still occurs with Eclipse Luna every few weeks. 

The "could not delete" error markers occur always after a restart of Eclipse (after a regular shutdown of Eclipse, not a crash).

My environment:

Windows 7
Eclipse Java EE IDE for Web Developers / Luna Service Release 1 (4.4.1)

The problem can be solved by manually deleting the folders ("refresh" or "clean" does not resolve the problem). 

IMO this is no "minor" issue as it is very annoying.
Comment 13 Sujana DV CLA 2017-09-05 06:19:14 EDT
Created attachment 270077 [details]
The following error displayed on delecting project from Project Explorer

Error message:The project was not built due to "Could not delete '/POC/bin/SeleniumWD'.". Fix the problem, then try refreshing this project and building it since it may be inconsi
Comment 14 Martin Schmiedel CLA 2018-04-25 08:33:48 EDT
I can confirm that this bug is still appearing with Eclipse 4.6.3 and Windows 7. Indexing Service is disabled for the Workspace paths.
Comment 15 Eclipse Genie CLA 2020-07-01 13:58:43 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 16 Eclipse Genie CLA 2022-06-23 09:19:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.