Uploaded image for project: 'Nutch'
  1. Nutch
  2. NUTCH-2512 Nutch does not build under JDK9
  3. NUTCH-2596

Upgrade from org.mortbay.jetty to org.eclipse.jetty

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.14
    • Fix Version/s: 1.19
    • Component/s: nutch server, test
    • Labels:
      None

      Description

      The old org.mortbay.jetty libs (not maintained since 2008) are still used for the Nutch server and multiple unit tests. Nutch should be upgraded to the maintained org.eclipse.jetty libs/packages.

      The old dependency causes the unit tests of the HTTP protocol plugins to fail when built with Java 9 or 10 with the following error while compiling JSP classes (see NUTCH-2512):

      2018-06-06 11:03:02,335 ERROR mortbay.log (Slf4jLog.java:warn(87)) - /basic-http.jsp
      java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
              at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:94)
              at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:100)
              at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
              at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
              at org.mortbay.jetty.Server.handle(Server.java:326)
              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
              at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
              at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      2018-06-06 11:03:02,356 WARN  mortbay.log (Slf4jLog.java:warn(76)) - /basic-http.jsp: javax.servlet.UnavailableException: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
      2018-06-06 11:03:02,386 INFO  mortbay.log (Slf4jLog.java:info(67)) - Stopped SelectChannelConnector@127.0.0.1:47504
      ...
      HTTP Status Code for http://127.0.0.1:47504/basic-http.jsp expected:<200> but was:<500>
      junit.framework.AssertionFailedError: HTTP Status Code for http://127.0.0.1:47504/basic-http.jsp expected:<200> but was:<500>
              at org.apache.nutch.protocol.http.TestProtocolHttp.fetchPage(TestProtocolHttp.java:130)
              at org.apache.nutch.protocol.http.TestProtocolHttp.testStatusCode(TestProtocolHttp.java:80)
      

        Attachments

          Activity

            People

            • Assignee:
              snagel Sebastian Nagel
              Reporter:
              snagel Sebastian Nagel

              Dates

              • Created:
                Updated:

                Issue deployment