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 247976 - Indexing of local maven repository repeats for ever
Summary: Indexing of local maven repository repeats for ever
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 247980 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-16 11:24 UTC by tremel
Modified: 2015-03-21 07:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.netbeans/8.0.1/var/log/messages.log (66.65 KB, text/x-log)
2014-10-16 11:24 UTC, tremel
Details
stacktrace (1.49 KB, text/plain)
2015-01-12 15:51 UTC, javydreamercsw
Details
stacktrace (1.49 KB, text/plain)
2015-01-29 16:22 UTC, javydreamercsw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tremel 2014-10-16 11:24:34 UTC
Created attachment 149937 [details]
.netbeans/8.0.1/var/log/messages.log

After removing ~/.cache/netbeans directory it is not possible to reindex the existing local maven repo in ~/.m2. When indexing is finished, it restarts again over and over.

INFO [org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl]: could not (re-)index local
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.lang.String.charAt(String.java:646)
	at org.netbeans.modules.maven.indexer.ClassDependencyIndexCreator.dependencies(ClassDependencyIndexCreator.java:348)
	at org.netbeans.modules.maven.indexer.ClassDependencyIndexCreator.addDependenciesToMap(ClassDependencyIndexCreator.java:244)
	at org.netbeans.modules.maven.indexer.ClassDependencyIndexCreator.populateArtifactInfo(ClassDependencyIndexCreator.java:130)
	at org.apache.maven.index.ArtifactContext.createDocument(ArtifactContext.java:184)
	at org.apache.maven.index.DefaultIndexerEngine.index(DefaultIndexerEngine.java:57)
	at org.apache.maven.index.DefaultScannerListener.artifactDiscovered(DefaultScannerListener.java:128)
	at org.apache.maven.index.DefaultScanner.processFile(DefaultScanner.java:106)
	at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:92)
	at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:84)
	at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:84)
	at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:84)
	at org.apache.maven.index.DefaultScanner.scanDirectory(DefaultScanner.java:84)
	at org.apache.maven.index.DefaultScanner.scan(DefaultScanner.java:53)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.scan(NexusRepositoryIndexerImpl.java:651)
Caused: java.io.IOException: Error scanning context local
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.scan(NexusRepositoryIndexerImpl.java:660)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexLoadedRepo(NexusRepositoryIndexerImpl.java:522)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.access$200(NexusRepositoryIndexerImpl.java:119)
[catch] at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$3.run(NexusRepositoryIndexerImpl.java:573)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl$3.run(NexusRepositoryIndexerImpl.java:566)
	at org.openide.util.Mutex.writeAccess(Mutex.java:404)
	at org.netbeans.modules.maven.indexer.NexusRepositoryIndexerImpl.indexRepo(NexusRepositoryIndexerImpl.java:566)
	at org.netbeans.modules.maven.indexer.api.RepositoryIndexer.indexRepo(RepositoryIndexer.java:58)
	at org.netbeans.modules.maven.options.SettingsPanel$12.run(SettingsPanel.java:718)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

I did remove the cache, because after update to Java 1.8.0_25 I had some problems with netbeans startup. These where caused by some files in ~/.netbeans directory and also cache directory that where owned by root after the installation. Meanwhile I changed ownership of all files to the user, but this problem with reindexing still exists. I think I had similar problems after deinstalling 8.0 and starting 8.0.1 for the first time.
Comment 1 tremel 2014-10-16 12:28:02 UTC
See Netbeans Error report id #746077. After deleting ~/.m2, the indexing did terminate. When rebuilding my applications the error came back.
Comment 2 tremel 2014-10-16 12:32:26 UTC
*** Bug 247980 has been marked as a duplicate of this bug. ***
Comment 3 Exceptions Reporter 2014-12-12 13:34:35 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=207212
Comment 4 javydreamercsw 2015-01-12 15:51:32 UTC
Created attachment 151464 [details]
stacktrace

Not sure what triggered this.
Comment 5 javydreamercsw 2015-01-29 16:22:00 UTC
Created attachment 151732 [details]
stacktrace

Refactoring/move a class.
Comment 6 Tomas Stupka 2015-03-20 09:47:52 UTC
could not reproduce, but looks like the parsing of class files in ClassDependencyIndexCreator does not honor some tags given by the spec ...
Comment 7 Tomas Stupka 2015-03-20 10:03:21 UTC
will use o.n.m.classfile.ClassFile to parse the class deps, that should by always uptodate ...
Comment 8 Tomas Stupka 2015-03-20 11:47:54 UTC
fixed in jet-main #274afee8fc9c
Comment 9 Quality Engineering 2015-03-21 07:56:24 UTC
Integrated into 'main-silver', will be available in build *201503210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/274afee8fc9c
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #247976 - Indexing of local maven repository repeats for ever