近日在项目中集成Elasticsearch后,Jetty启动报错。

错误日志如下:

Suppressed:
|java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class from jar file:///data/program/capital/cloud/work/jetty-0.0.0.0-16201-capital-cloud.war-_capital-cloud-any-/webapp/WEB-INF/lib/log4j-api-2.11.1.jar
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:462)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
| at java.lang.Thread.run(Thread.java:748)
|Caused by:
|java.lang.IllegalArgumentException
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.objectweb.asm.ClassReader.<init>(Unknown Source)
| at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
| at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:462)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
| at java.lang.Thread.run(Thread.java:748)
Caused by:
java.lang.RuntimeException: Error scanning entry META-INF/versions/9/module-info.class from jar file:///data/program/capital/cloud/work/jetty-0.0.0.0-16201-capital-cloud.war-_capital-cloud-any-/webapp/WEB-INF/lib/log4j-api-2.11.1.jar
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:891)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:462)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
at java.lang.Thread.run(Thread.java:748)
Caused by:
java.lang.IllegalArgumentException
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.objectweb.asm.ClassReader.<init>(Unknown Source)
at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:959)
at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:940)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:887)
at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:837)
at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:159)
at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:462)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591)
at java.lang.Thread.run(Thread.java:748)

于是翻江倒海的四处查解决方案,有的说把jar包里面的version删掉再重新打包更改版本号,试过不起作用。

后来又找历史发布公告,发现是jetty版本不兼容引起的,升级到jetty-9.4.8.v20171121即可完美解决问题。

查找的一些资源网站:

1. http://cache.baiducontent.com/c?m=9d78d513d99401ef05ad837e7c5786354508db3f69c0d0642888d508d8735b301831a5e830236013d3b36b6671f41508fdf04736604361ecc694c95dddca993f2ff97a74250b863041914afe911132c151ce07bcfa42bbefe732e2f08f86d90c478d135b75dab6cd184103cb1ced0970a5f5c811481b47fab96e38ba4e775ece7e1fab04beb773285cdcaa9c414ac92fd3651095ab28e46d49eb44f2081b5205e61f&p=882a970ac5904ead07f58c6611&newp=8c769a479d9718ff57ef82231653d8304a02c70e3ac3864e1290c408d23f061d4862e7b12525170ed0c37b6307a94c56e1f5327123454df6cc8a871d81edd97c76&user=baidu&fm=sc&query=Error+scanning+entry+META-INF/versions/9/org/apache/logging/log4j&qid=a4ae72860018d6f8&p1=2

2. https://blog.csdn.net/baidu_34036884/article/details/80151963

3. 关于jdk9的兼容问题:

https://github.com/eclipse/jetty.project/issues/1797

https://github.com/eclipse/jetty.project/pull/1801

4. 历史版本发布记录:

https://www.eclipse.org/lists/jetty-announce/2017/Nov/index.php

9.4.7针对jdk9开始兼容:https://www.eclipse.org/lists/jetty-announce/msg00111.html

9.4.8针对jdk9兼容优化:https://www.eclipse.org/lists/jetty-announce/msg00114.html

5. Jetty文档:

https://www.eclipse.org/jetty/documentation/9.3.27.v20190418/

6. Jetty历史服务下载地址

https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/

Jetty启动报Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class的更多相关文章

  1. spring mvc:Error scanning entry module-info.class from jar错误

    项目从jdk1.6升级到jdk1.8,启动的时候出现如下错误: java.lang.RuntimeException: Error scanning entry module-info.class f ...

  2. springboot 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer

    springboot +gradle 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data ...

  3. 解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误

    解决软件启动报error while loading shared libraries: libgd.so.2: cannot open shared object错误 今天安装启动nginx的时候报 ...

  4. Jetty启动报错排查org.eclipse.jetty.util.MultiException: Multiple exceptions

    最近自己搭建了一个spring的项目,使用Maven做项目构建,使用JDK8,为了方便启动就使用jetty作为启动容器,但是却无意间步入了一个坑 [WARNING] Failed startup of ...

  5. Error:gradle-resources-test:thymeleaf-in-action.main: java.lang.NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream

    目录 Error:gradle-resources-test:thymeleaf-in-action.main: java.lang.NoClassDefFoundError: org/apache/ ...

  6. 【JUnit 报错】java.lang.NoClassDefFoundError: org/apache/logging/log4j/message/Message

    使用JUnit的时候,报错:java.lang.NoClassDefFoundError: org/apache/logging/log4j/message/Message 原因是因为项目中导入的架包 ...

  7. Hadoop启动报Error: JAVA_HOME is not set and could not be found解决办法

    Hadoop安装完后,启动时报Error: JAVA_HOME is not set and could not be found. 解决办法: 修改/etc/hadoop/hadoop-env.sh ...

  8. Mysql 5.7源码编译启动 报error问题:The server quit without updating PID file (/data/data_mysql/mysql.pid).

    一般是报error问题就是我们的mysql没有权限,这里主要是指三点:一个是mysql的安装主目录要设为mysql用户和用户组.一个是logs目录设置为mysql用户以及用户组.还有一个是data目录 ...

  9. Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException

    maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...

随机推荐

  1. Could not resolve resource location pattern [classpath:com/****/mappers/*.xml]: class path resource [com/****/mappers/] cannot be resolved to URL because it does not exist的问题

    这里建议先去看看路径的问题,看看application.xml的里面的导入的相应的配置文件的路径有没有问题,如下: 再者看看相应的注解有没有加上,service和controller等的注解 如果再不 ...

  2. CodeForces - 1256C (思维+贪心)

    题意 https://vjudge.net/problem/CodeForces-1256C 有一条宽度为n的河.河的左岸编号为0,右岸编号为n+1.河流上还有m个木制平台,第i个平台的长度为ci(所 ...

  3. CentOS 8安装体验

    这两天出来了,晚上爽一爽. 一,下载 http://ftp.sjtu.edu.cn/centos/8.0.1905/isos/x86_64/ 还是那7G左右的保险,没有minial版了,那个500m多 ...

  4. 详解Vue生命周期---1

    目录 Vue实例的生命周期全过程(图) 在beforeCreate和created钩子函数间的生命周期 created钩子函数和beforeMount间的生命周期 el选项的有无对生命周期过程的影响 ...

  5. Pwnable-blukat

    ssh blukat@pwnable.kr -p2222 (pw: guest) 连接上去看看c的源码 #include <stdio.h> #include <string.h&g ...

  6. MongoTemplate 分组分页复合条件查询

    一.前言 最近项目使用MongoDB作为数据主要存取的地方 又是第一次接触MongoDB,也是踩了不少坑... 维护数据无非就是增删改查,而里面最复杂的就是查询了 所以来总结一下有关MongoDB的查 ...

  7. [CEOI2019]Cubeword(暴力)

    没错,标签就是暴力. 首先发现棱上的所有词长度都相等,枚举长度 \(len\). 然后发现这些词中只有第一个字符和最后一个字符比较重要(只有这两个位置会与别的串衔接,中间的是啥无所谓). 令 \(cn ...

  8. MySQL实战45讲学习笔记:第三十五讲

    一.本节概述 在上一篇文章中,我和你介绍了 join 语句的两种算法,分别是 Index Nested-LoopJoin(NLJ) 和 Block Nested-Loop Join(BNL). 我们发 ...

  9. windows端口转发工具(LCX)

    端口转发(Port forwarding),有时被叫做隧道,是安全壳(SSH) 为网络安全通信使用的一种方法.端口转发是转发一个网络端口从一个网络节点到另一个网络节点的行为,其使一个外部用户从外部经过 ...

  10. vs安装包离线下载

    1.首先打开visual studio 的官网下载最新的安装程序. https://www.visualstudio.com/zh-hans/?rr=https%3A%2F%2Fwww.baidu.c ...