Spark 监控后台:javax.servlet.http.HttpServletRequest.isAsyncStarted()Z

本地idea运行spark时,可通过http://20.3.7.114:4040 访问spark监控后台(端口4040为默认,可配置)

报错信息:

java.lang.NoSuchMethodError: javax.servlet.http.HttpServletRequest.isAsyncStarted()Z
at org.spark_project.jetty.servlets.gzip.GzipHandler.handle(GzipHandler.java:484)
at org.spark_project.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.spark_project.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.spark_project.jetty.server.Server.handle(Server.java:499)
at org.spark_project.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.spark_project.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.spark_project.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.spark_project.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.spark_project.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

然后在头部导入: import javax.servlet.http.HttpServletRequest

发现javax.servlet » servlet-api 版本是2.5的和3.0的,导致包冲突。

由于两个版本冲突导致,可直接删除2.5版本即可,IntellijIdeal删除办法,就直接搞定

猜你喜欢

转载自blog.csdn.net/hexinghua0126/article/details/85103531