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 177460 - [68cat] IOE: File ...\var\cache\mavenindex\...\... unable to be deleted
Summary: [68cat] IOE: File ...\var\cache\mavenindex\...\... unable to be deleted
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
: 192620 195073 198298 198438 198569 198669 199943 200064 200652 201845 203505 203908 203955 (view as bug list)
Depends on: 205034
Blocks: 195357
  Show dependency tree
 
Reported: 2009-11-23 10:37 UTC by jpleed3
Modified: 2011-11-16 01:09 UTC (History)
17 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 150955


Attachments
stacktrace (1.44 KB, text/plain)
2009-11-23 10:37 UTC, jpleed3
Details
stacktrace (1.52 KB, text/plain)
2011-08-02 20:23 UTC, alied
Details
stacktrace (1.51 KB, text/plain)
2011-08-08 20:15 UTC, alied
Details
stacktrace (1.58 KB, text/plain)
2011-09-19 19:12 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jpleed3 2009-11-23 10:37:07 UTC
Build: NetBeans IDE Dev (Build 200911220201)
VM: Java HotSpot(TM) Client VM, 14.3-b01, Java(TM) SE Runtime Environment, 1.6.0_17-b04
OS: Windows XP, 5.1, x86

User Comments:
GUEST: Just working with ide, screen changing

jpleed3: Trying to create new Maven J6EE web project

GUEST: Right-clicked "Find Usages" on a method in a Java class in a Maven WAR  project.



Stacktrace: 
java.io.IOException: File C:\Documents and Settings\JL89798\.netbeans\dev\var\cache\mavenindex\java.net2\_5.prx unable to be deleted.
        at hidden.org.codehaus.plexus.util.FileUtils.forceDelete(FileUtils.java:1246)
        at hidden.org.codehaus.plexus.util.FileUtils.cleanDirectory(FileUtils.java:1459)
        at hidden.org.codehaus.plexus.util.FileUtils.deleteDirectory(FileUtils.java:1410)
        at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.loadIndexingContext(NexusRepositoryIndexerImpl.java:282)
        at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$300(NexusRepositoryIndexerImpl.java:137)
        at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$1.run(NexusRepositoryIndexerImpl.java:429)
Comment 1 jpleed3 2009-11-23 10:37:10 UTC
Created attachment 91552 [details]
stacktrace
Comment 2 Antonin Nebuzelsky 2010-07-28 09:14:44 UTC
Windows XP specific.

No report since 6.8. Possibly fixed by an indexer library update.

Closing for now.
Comment 3 Jesse Glick 2010-11-29 21:26:57 UTC
*** Bug 192620 has been marked as a duplicate of this bug. ***
Comment 4 Jesse Glick 2010-11-29 21:27:26 UTC
Reported in 6.9.
Comment 5 Jesse Glick 2011-05-23 23:08:13 UTC
*** Bug 198669 has been marked as a duplicate of this bug. ***
Comment 6 Jesse Glick 2011-05-23 23:08:23 UTC
*** Bug 198438 has been marked as a duplicate of this bug. ***
Comment 7 Jesse Glick 2011-05-23 23:08:39 UTC
*** Bug 198569 has been marked as a duplicate of this bug. ***
Comment 8 Jesse Glick 2011-05-23 23:08:50 UTC
*** Bug 198298 has been marked as a duplicate of this bug. ***
Comment 9 Jesse Glick 2011-05-23 23:09:27 UTC
*** Bug 195073 has been marked as a duplicate of this bug. ***
Comment 10 Jesse Glick 2011-07-11 14:10:53 UTC
*** Bug 199943 has been marked as a duplicate of this bug. ***
Comment 11 Jesse Glick 2011-07-13 23:10:34 UTC
*** Bug 200064 has been marked as a duplicate of this bug. ***
Comment 12 alied 2011-08-02 20:23:55 UTC
Created attachment 109754 [details]
stacktrace

searching dependencies in maven repositories
Comment 13 alied 2011-08-08 20:15:34 UTC
Created attachment 109873 [details]
stacktrace

Everytime I add or remove a depencency I have this exception.
In case it matters, the filesystem is NTFS but %userprofile% has all permissions for my user.
Comment 14 Jesse Glick 2011-08-10 20:41:07 UTC
(In reply to comment #13)
> Every time I add or remove a depencency I have this exception.

Workaround should simply be to delete the corrupted subdir of mavenindex and restart. I still do not know how to reproduce from scratch.
Comment 15 Jesse Glick 2011-08-15 14:55:21 UTC
*** Bug 200652 has been marked as a duplicate of this bug. ***
Comment 16 Marian Petras 2011-09-19 19:12:57 UTC
Created attachment 110881 [details]
stacktrace
Comment 17 Marian Mirilovic 2011-10-13 13:25:15 UTC
143 duplicates , just 5 against 7.1 Beta
Comment 18 Marian Mirilovic 2011-10-20 06:27:41 UTC
*** Bug 203955 has been marked as a duplicate of this bug. ***
Comment 19 Marian Mirilovic 2011-10-20 06:29:44 UTC
Number of duplicates is still rising, achieved 15 dups and 145 reports .. P2
Comment 20 Jesse Glick 2011-10-20 21:28:05 UTC
Typical prelude is:

INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl]: Found a broken index at ...\var\cache\mavenindex\local
org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: ...\var\cache\mavenindex\local\write.lock
	at org.apache.lucene.store.NativeFSLock.release(NativeFSLockFactory.java:278)
	at org.apache.lucene.index.IndexWriter.unlock(IndexWriter.java:4907)
	at org.apache.maven.index.context.DefaultIndexingContext.prepareCleanIndex(DefaultIndexingContext.java:263)
	at org.apache.maven.index.context.DefaultIndexingContext.prepareIndex(DefaultIndexingContext.java:237)
	at org.apache.maven.index.context.DefaultIndexingContext.<init>(DefaultIndexingContext.java:157)
	at org.apache.maven.index.context.DefaultIndexingContext.<init>(DefaultIndexingContext.java:167)
	at org.apache.maven.index.DefaultNexusIndexer.addIndexingContextForced(DefaultNexusIndexer.java:110)
[catch] at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.loadIndexingContext(NexusRepositoryIndexerImpl.java:361)

Only occurs on Windows. Probably caused somehow by a corrupted Lucene index. Still no idea how to reproduce; tried on XP to delete miscellaneous files from var\cache\mavenindex\central, but the index is quietly repaired (even though empty); if I delete everything from the dir and restart, the index is quietly downloaded again. Same for local - if intentionally damaged, the Indexer just resets its contents to a fresh empty index; manual reindexing works fine.

While I can suppress the actual exception being reported here, that is unlikely to fix the real problem, and it is probable that some other exception would just be thrown later. Essentially the same as bug #195357; my attempted fix does not seem to be working, or at least not on Windows (hard to say if it does anything on Unix); the code to try to clean up a broken index dates back to Mevenide days but does not seem functional.
Comment 21 Jesse Glick 2011-10-20 21:30:11 UTC
core-main #a4ee14a33968
Comment 22 Quality Engineering 2011-10-24 14:03:08 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a4ee14a33968
User: Jesse Glick <jglick@netbeans.org>
Log: #177460: [68cat] IOE: File ...\var\cache\mavenindex\...\... unable to be deleted
Not so much a real fix as a change in error handling.
Comment 23 Jesse Glick 2011-10-25 20:15:58 UTC
*** Bug 203505 has been marked as a duplicate of this bug. ***
Comment 24 Jesse Glick 2011-10-31 17:28:30 UTC
*** Bug 201845 has been marked as a duplicate of this bug. ***
Comment 25 Jesse Glick 2011-10-31 17:28:38 UTC
*** Bug 203908 has been marked as a duplicate of this bug. ***