Jetty启动报Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/ProcessIdUtil.class

After recently integrated Elasticsearch in the project, Jetty start error.

Error log is as follows:

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)

So badly the four search solutions, some say the jar inside the package version deleted and then re-packaged change the version number, I tried does not work.

And later issued a public notice looking for history, jetty found to be caused by an incompatible version, upgrade to jetty- 9 .4.8.v20171121 perfect solution to the problem.

Find some resource site:

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. With regard to jdk9 compatibility issues:

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

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

4. History record release:

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

  9.4.7 start compatible for jdk9: https://www.eclipse.org/lists/jetty-announce/msg00111.html

  9.4.8 compatible optimized for jdk9: https://www.eclipse.org/lists/jetty-announce/msg00114.html

5. Jetty document:

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

6. Jetty history Download Service

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

Guess you like

Origin www.cnblogs.com/commissar-Xia/p/11330146.html