0

Trying to host solr 5.0 in jetty 8. This line in solr codebase (the isFinished() method) was throwing a NoSuchMethodException since I was using servlet API 3.0.

The error was replaced with AbstractMethodException when I upgraded to javax-servlet-api 3.1. The problem seems to be that isFinished() is indeed an abstract method, as shown here

The javax ServletRequest class does return an instance of the (abstract) ServletInputStream as shown here - and at least in my case the InputStream in jetty ServletRequest.getInputStream() seems to return a ServletInputStream with isFinished() not implemented, and hence the error.

Any work arounds? I must be missing something here since I do not think the solr codebase would be invoking an HttpServletRequest.getInputStream().isFinished() if it had not expected a properly instantiated ServletInputStream.

1 Answers1

3

Note: Jetty 8 is EOL (End of Life)

It is not possible to host Solr 5 (or anything that requires Servlet 3.1) in Jetty 8.

The first version of Jetty to support Servlet 3.1 was Jetty 9.1.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
  • Ok thanks. That's what I needed to know. If I'm using servlet 3.1 then Jetty 9 is a must it seems – Kevin Martin Jose Nov 09 '16 at 14:19
  • Why technically correct , the answer doesn't explicitly state that there is a mismatch between the newer interface and older implementation versions (see this answer https://stackoverflow.com/questions/17969365/why-i-am-getting-java-lang-abstractmethoderror-errors ) – Dr Phil Apr 07 '21 at 17:27