Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
794 views
in Technique[技术] by (71.8m points)

java - Bytecode Scanning error on META-INF/versions/9/* and Elasticsearch 6.2.2+ with Jetty 9.2

Running GWT app in the Superdev mode with the latest versions of Elasticsearch (above 6.1.1) creates the following error (see below). It is clear that the issue has to do with the outdated version of Jetty. Does anyone know how to replace Jetty in GWT or change the configuration in IntelliJ to use a different server? The instructions in GWT documentation are, in my opinion, poorly written. Ideally, of course, I wish there was a way to change Jetty directly in GWT so that all projects can use the updated version instead of configuring each project with its own server.

2018-06-20 16:17:13.923:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
Starting Jetty on port 8888
   [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@39f6694a{/,file:/Users/../Library/Caches/IntelliJIdea2018.1/gwt/....86a74491/....92536ba7/run/www/,STARTING}{/Users/../Library/Caches/IntelliJIdea2018.1/gwt/....86a74491/....92536ba7/run/www}
MultiException[java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/elasticsearch/core/internal/io/Streams.class from jar file:/Users/../Library/Caches/IntelliJIdea2018.1/gwt/.86a74491/.92536ba7/run/www/WEB-INF/lib/elasticsearch-core-6.3.0.jar, java.lang.RuntimeException: Error scanning entry META-INF/versions/9/org/elasticsearch/monitor/jvm/JvmPid.class from jar file:/Users/../Library/Caches/IntelliJIdea2018.1/gwt/...86a74491/.92536ba7/run/www/WEB-INF/lib/elasticsearch-6.3.0.jar]
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:536)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
    at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:479)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have a JEP238 MultiRelease Jar File in your classpath.

Evidenced by the META-INF/versions/9/ prefixed entry.

JEP238 is a concept introduced with Java 9.

Jetty support for handling JEP238 MultiRelease JAR Files during bytecode scanning wasn't introduced until the Jetty 9.4.9.v20180320 (in March of 2018).

If you need to stay with Jetty 9.2.x then you'll have to not use JEP238 MultiRelease JAR Files.

If you must use JEP238 MultiRelease JAR Files, then you must upgrade to at least Jetty 9.4.9.v20180320.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...