aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes exception: java.lang.NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "exception: java.lang.NoSuchMethodError" Watch "exception: java.lang.NoSuchMethodError" New topic
Author

exception: java.lang.NoSuchMethodError

adam bilyone
Greenhorn

Joined: Aug 14, 2011
Posts: 16
I am currently using netbeans 7.0.1, i notice that on startup, an error icon pop up on the status bar, when i click it shows the following exception.

java.lang.NoSuchMethodError: org.apache.lucene.analysis.KeywordAnalyzer.setOverridesTokenStreamMethod(Ljava/lang/Class;)V
at org.apache.lucene.analysis.KeywordAnalyzer.<init>(KeywordAnalyzer.java:29)
at org.netbeans.modules.java.source.usages.DocumentUtil.createAnalyzer(DocumentUtil.java:118)
at org.netbeans.modules.java.source.usages.PersistentClassIndex.<init>(PersistentClassIndex.java:105)
at org.netbeans.modules.java.source.usages.PersistentClassIndex.create(PersistentClassIndex.java:190)
at org.netbeans.modules.java.source.usages.ClassIndexManager.createUsagesQuery(ClassIndexManager.java:204)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory$1$1.run(JavaCustomIndexer.java:814)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory$1$1.run(JavaCustomIndexer.java:811)
at org.netbeans.modules.parsing.lucene.support.IndexManager$1.call(IndexManager.java:103)
at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:168)
at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:356)
at org.netbeans.modules.parsing.lucene.support.IndexManager.writeAccess(IndexManager.java:100)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory$1.run(JavaCustomIndexer.java:811)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory$1.run(JavaCustomIndexer.java:808)
at org.netbeans.modules.java.source.usages.ClassIndexManager.prepareWriteLock(ClassIndexManager.java:120)
at org.netbeans.modules.java.source.indexing.JavaCustomIndexer$Factory.scanStarted(JavaCustomIndexer.java:808)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanStarted(RepositoryUpdater.java:1695)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:2179)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:2374)
[catch] at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:2231)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:3988)
at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:3928)
at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:615)
at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:720)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Also, search capability of package and classes is not functioning, for instance,
import javax.
after typing the dot i expect all the packages in javax to pop up, likewise the classes in the package. To cut long story short, the netbeans is malfunctioning.
Please can anyone help me out?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

I suspect that you have a lucene JAR in your classpath (or in your JVM's endosred directory) and that that is the one NetBeans is picking up. (If you were running Eclipse, I would tell you to add -verbose:class to the eclipse.ini file, and then start Eclipse using eclipsec.exe so that you could find out where it was picking up the lucene JAR, but I don't know how to do that for NetBeans - I know how to set the option, but I don't know how to convince NetBeans to open in console mode.)


JBoss In Action
adam bilyone
Greenhorn

Joined: Aug 14, 2011
Posts: 16
I got an idea from your contribution and i was be able to fix it. Thanks alot sir.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Adam, please tell use exactly what you did to solve the problem. That will help other Ranchers who come across your post later. Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exception: java.lang.NoSuchMethodError