[jira] [Commented] (NUTCH-2596) Upgrade from org.mortbay.jetty to org.eclipse.jetty

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (NUTCH-2596) Upgrade from org.mortbay.jetty to org.eclipse.jetty

Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/NUTCH-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108445#comment-17108445 ]

Sebastian Nagel commented on NUTCH-2596:
----------------------------------------

Hi [~balaShashanka], yes, of course, that'd be great! This is the single one issue which should definitely get addressed for 1.17 - simple because it's time to fully support Java 9 and upwards. One warning: I've started already two trials to get it solved early this year. The first one by upgrading Jetty (see [branch NUTCH-2596-upgrade-jetty|https://github.com/sebastian-nagel/nutch/tree/NUTCH-2596-upgrade-jetty]: however, unit tests fail to compile and also the Nutch server does not start. The second trial was to get rid of Jetty for the HTTP protocol unit tests (see [there|https://github.com/sebastian-nagel/nutch/tree/NUTCH-2596-http-protocol-plugin-test-remove-jsp]), works but unfinished and I lost the confidence that it's really the right approach (a lot of changes only to avoid Jetty and JSP). I'm by no means a Jetty expert, so I'm happy if there is one with more experience here. So, think about it and let me know. Be sure I'll support as I can.

> Upgrade from org.mortbay.jetty to org.eclipse.jetty
> ---------------------------------------------------
>
>                 Key: NUTCH-2596
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2596
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: nutch server, test
>    Affects Versions: 1.14
>            Reporter: Sebastian Nagel
>            Assignee: Sebastian Nagel
>            Priority: Major
>             Fix For: 1.17
>
>
> 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):
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)