You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/03/15 18:10:00 UTC

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

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

ASF GitHub Bot commented on NUTCH-2596:
---------------------------------------

sebastian-nagel opened a new pull request #574:
URL: https://github.com/apache/nutch/pull/574


   - remove Jetty (used to serve JSP pages) from HTTP protocol plugin tests (unit tests of protocol-http, protocol-okhttp, protocol-httpclient)
   - replace JSP pages by header/content strings hold in unit test classes resp. methods to validate request headers and serve the content based on the request headers


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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.19
>
>
> 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)