Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9809

oak-run server: update Jetty because of outdated servlet API version

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.42.0
    • 1.44.0, 1.22.14
    • oak-run
    • None

    Description

      When an attempt is made to run the oak server as follows:

      /usr/bin/java -jar ~/.m2/repository/org/apache/jackrabbit/oak-run/1.43-SNAPSHOT/oak-run-1.43-SNAPSHOT.jar server http://localhost:9996/ Oak-Segment-Tar --base ~/src/apache/sandbox/jackrabbit/jackrabbit-test
      

      And you hit it with a browser as follows:

      http://localhost:9996/jcrremote/

      The following error is logged and the request fails with a 500 Internal Server Error.

      15:44:43.049 [qtp553879264-25] WARN  o.e.jetty.servlet.ServletHandler - Error for /jcrremote/
      java.lang.NoSuchMethodError: 'void javax.servlet.http.HttpServletResponse.setContentLengthLong(long)'
      	at org.apache.jackrabbit.webdav.io.OutputContextImpl.setContentLength(OutputContextImpl.java:61)
      	at org.apache.jackrabbit.webdav.jcr.RootCollection.spool(RootCollection.java:191)
      	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.spoolResource(AbstractWebdavServlet.java:607)
      	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.doGet(AbstractWebdavServlet.java:557)
      	at org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet.doGet(JcrRemotingServlet.java:380)
      	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.execute(AbstractWebdavServlet.java:398)
      	at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:316)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      	at org.eclipse.jetty.server.Server.handle(Server.java:370)
      	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:973)
      	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1035)
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:641)
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
      	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      

      Looks like `javax.servlet-api` being brought in is too old - needs to be 3.1 or higher.

      Attachments

        1. OAK-9809.diff
          0.4 kB
          Julian Reschke

        Issue Links

          Activity

            People

              reschke Julian Reschke
              minfrin Graham Leggett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: