You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by xx...@drexel.edu on 2005/04/09 16:43:07 UTC

NoSuchMethodError

Hello -

I tried to modify Document(File) method as Document1(String) of HTMLDocument.java. The parameter is String, not File. However I got: 

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.lucene.demo.HTMLDocument.Document1(Ljava/lang/String;)Lorg/apache/lucene/document/Document;
        at org.apache.lucene.demo.IndexRemoteHTML.indexDocs1(IndexRemoteHTML.java:173)
        at org.apache.lucene.demo.IndexRemoteHTML.indexDocs(IndexRemoteHTML.java:120)
        at org.apache.lucene.demo.IndexRemoteHTML.main(IndexRemoteHTML.java:74)

What could be wrong?

Thanks for help in advance...

George


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: NoSuchMethodError

Posted by Gusenbauer Stefan <gu...@eduhi.at>.
xx28@drexel.edu wrote:

>Hello -
>
>I tried to modify Document(File) method as Document1(String) of HTMLDocument.java. The parameter is String, not File. However I got: 
>
>Exception in thread "main" java.lang.NoSuchMethodError: org.apache.lucene.demo.HTMLDocument.Document1(Ljava/lang/String;)Lorg/apache/lucene/document/Document;
>        at org.apache.lucene.demo.IndexRemoteHTML.indexDocs1(IndexRemoteHTML.java:173)
>        at org.apache.lucene.demo.IndexRemoteHTML.indexDocs(IndexRemoteHTML.java:120)
>        at org.apache.lucene.demo.IndexRemoteHTML.main(IndexRemoteHTML.java:74)
>
>What could be wrong?
>
>Thanks for help in advance...
>
>George
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
>  
>
try to check the modifiers of the main method and of the Document1
method they should be static I think. By the way a better approach would
be you rename the Document1 Method to Document (overloading) and call in
the new Document(String file) method the original Document Method.
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org