This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 193539 - Excessive file locking makes development difficult with Netbeans running
Summary: Excessive file locking makes development difficult with Netbeans running
Status: RESOLVED DUPLICATE of bug 197927
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 7.0
Hardware: PC Windows Vista
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 198757 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-17 09:43 UTC by sazzer
Modified: 2011-06-03 19:46 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sazzer 2010-12-17 09:43:53 UTC
With Netbeans 7.0 Beta running, and having an external Maven2 project open in the IDE, I find that I am unable to execute an "mvn clean" on the command line - outside of the IDE due to POM files on occasion being locked. Closing the IDE immediately resolves this problem. 

Additionally, deploying WAR projects - again externally and not using the Netbeans deploy functionality - to an external Tomcat where the WAR exists in the source tree that Netbeans has open occasionally fails giving "tmpFile.renameTo(classFile) failed" on a JSP file. The JSP in question varies from deploy to deploy but is always the same on the same deployment. Again, closing the IDE and then re-building and re-deploying the WAR file and it all works correctly.
Comment 1 sazzer 2010-12-20 14:27:13 UTC
The bug doesn't seem to reproduce at all on the current Netbeans 7.0 beta release running on Ubuntu 10.10 64-bit.
Comment 2 Tomas Danek 2010-12-22 09:55:47 UTC
so it's reproducible on windows and not on ubuntu?
Comment 3 Jesse Glick 2011-01-04 18:44:10 UTC
Reproducible on XP, or only on Vista?
Comment 4 Antonin Nebuzelsky 2011-01-14 16:42:23 UTC
Unable to reproduce on Vista with 7.0 Beta build.

I was using Process Explorer from Sysinternals to watch which files are locked by the process but did not encounter any moment when a maven project's files would stay in the list.

Can you provide more information about reproducibility of the problem?

What steps should we take to see the problem? Thanks.
Comment 5 superole2 2011-05-16 13:38:16 UTC
I too have experienced this problem.
Whenever NB7 is running, I get spurious file access errors in maven(both when running maven in NB7, and from the commandline). I also get them in my archiving software when accessing files that have been touched by NB7.
When NB7 is not running the errors do not occur.

This is particulary annoying when trying to build maven projects with multiple modules with dependencies, because the chance of getting a successful build decreases with the power of n (for n modules).

Reproduction may require more than one attempt, as it happens spuriously.

This issue exists at least on:
Product Version = NetBeans IDE 7.0 (Build 201104080000)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.6.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 17.0-b17

example output from maven 2.2.1 running in NB7:
------------------------------------------------------------------------
Building XXX
   task-segment: [clean, install]
------------------------------------------------------------------------
[clean:clean]
Deleting directory C:\Users\OleS\Documents\NetBeansProjects\XXX\target
------------------------------------------------------------------------
BUILD ERROR
------------------------------------------------------------------------
Failed to delete directory: C:\Users\OleS\Documents\NetBeansProjects\XXX\target. Reason: Unable to delete directory C:\Users\OleS\Documents\NetBeansProjects\XXX\target\classes\xxx
Comment 6 superole2 2011-05-16 13:43:04 UTC
(In reply to comment #5)
oh, and I forgot to mention, this problem does NOT occur when using NB6.9.1 (instead of NB7),on the same computer...
Comment 7 Jesse Glick 2011-05-23 21:35:02 UTC
Probably dupe of bug #195288?
Comment 8 Jesse Glick 2011-05-24 21:54:59 UTC
*** Bug 198757 has been marked as a duplicate of this bug. ***
Comment 9 superole2 2011-05-30 08:22:42 UTC
(In reply to comment #7)
> Probably dupe of bug #195288?

Yes, it probably is.
And the solution you posted there;

Adding -J-Dorg.netbeans.modules.masterfs.watcher.disable=true to
netbeans_default_options in netbeans.conf (\NetBeans 7.0\etc\netbeans.conf)

Seems to work for me in Win7 64bit.
Comment 10 Antonin Nebuzelsky 2011-05-30 10:46:57 UTC
Reassigning to Filesystems.
Comment 11 Jaroslav Tulach 2011-06-01 09:17:51 UTC

*** This bug has been marked as a duplicate of bug 197927 ***
Comment 12 Jesse Glick 2011-06-01 23:51:17 UTC
Did you manage to reproduce this (and/or bug #195288) on a Windows 7 machine, and if so did you confirm that the fix of bug #197927 addressed the problem?
Comment 13 Jaroslav Tulach 2011-06-03 19:46:04 UTC
I have not reproduced any of the problems myself.