You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by szzoli <re...@freemail.hu> on 2016/09/02 12:30:07 UTC
Java function throws exception on JSP web application
Hi,
I created a Lucene application with patametrised indexing and searching
functions.
I exported as jar, and imoprted to jsp pages.
When I call the indexing function, it gives the following error:
java.lang.VerifyError: Cannot inherit from final class.
I did not make any inheritence, just called my
result = hu.drehsden.test.IndexFiles.processDocs(indexPath, docPath);
function withe the appropriate parameters.
When I called my
result = hu.drehsden.test.SearchFiles.processQuery(paramIndex, paramSearch);
function, it had this problem:
javax.servlet.ServletException: java.lang.NoSuchMethodError:
org.apache.lucene.store.FSDirectory.open(Ljava/nio/file/Path;)Lorg/apache/lucene/store/FSDirectory;
Both functions work when I call them in Eclipse and return the result as
String.
Could you please help me?
--
View this message in context: http://lucene.472066.n3.nabble.com/Java-function-throws-exception-on-JSP-web-application-tp4294431.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
RE: Java function throws exception on JSP web application
Posted by Martin Gainty <mg...@hotmail.com>.
NoMethodFoundError is wrong servlet jar you cannot mix servlet-api.jar that does not meet the current Java Servlet Spec supported for your webapp
https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
cannot override final class means exactly that ..any class that attempts to override a final class will throw that exception
select another class with commensurate functionality that isnt final to override or just use concrete implementation of final class itself
https://coderanch.com/t/410683/java/java/final-class
Martin-
> Date: Mon, 5 Sep 2016 00:41:54 -0700
> From: reg9szabo@freemail.hu
> To: dev@lucene.apache.org
> Subject: Re: Java function throws exception on JSP web application
>
> Now, I became angry with silly errors. I created a new web application,
> copied the jars ini it, and now it works fine.
>
> But I have no idea, wat is the difference between the two applications.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Java-function-throws-exception-on-JSP-web-application-tp4294431p4294632.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
Re: Java function throws exception on JSP web application
Posted by szzoli <re...@freemail.hu>.
Now, I became angry with silly errors. I created a new web application,
copied the jars ini it, and now it works fine.
But I have no idea, wat is the difference between the two applications.
--
View this message in context: http://lucene.472066.n3.nabble.com/Java-function-throws-exception-on-JSP-web-application-tp4294431p4294632.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: Java function throws exception on JSP web application
Posted by szzoli <re...@freemail.hu>.
The sarch porblem occure in the Java class at the line
reader = DirectoryReader.open(FSDirectory.open(Paths.get(indexPath)));
wich works fine from Eclipse.
--
View this message in context: http://lucene.472066.n3.nabble.com/Java-function-throws-exception-on-JSP-web-application-tp4294431p4294436.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org