在Eclipse SuperDevMode中启动GWT应用程序时出现org.eclipse.jetty.util.MultiException

问题描述

当我尝试在Eclipse中启动GWT应用程序时,我面临以下异常(与旧版Devmode和SuperDevmode相同)。 我尝试使用最新的Eclipse版本(2020-06)和Eclipse Photon。
Eclipse嵌入式Jetty版本似乎是一个问题,但最新的Eclipse(2020-06)应该包含支持JEP-238多发布Jars的Jetty版本。

java Vesion 1.8

GWT版本2.8.2

有人知道我在做什么错吗?

org.eclipse.jetty.util.MultiException: Multiple exceptions
    at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:536) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:479) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1337) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505) ~[gwt-dev.jar:na]
    at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:550) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [gwt-dev.jar:na]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [gwt-dev.jar:na]
    at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [gwt-dev.jar:na]
    at org.eclipse.jetty.server.Server.start(Server.java:387) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [gwt-dev.jar:na]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [gwt-dev.jar:na]
    at org.eclipse.jetty.server.Server.doStart(Server.java:354) [gwt-dev.jar:na]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [gwt-dev.jar:na]
    at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:760) [gwt-dev.jar:na]
    at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:636) [gwt-dev.jar:na]
    at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923) [gwt-dev.jar:na]
    at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706) [gwt-dev.jar:na]
    at com.google.gwt.dev.DevMode.main(DevMode.java:432) [gwt-dev.jar:na]
org.eclipse.jetty.util.MultiException: Multiple exceptions
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:899) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) ~[gwt-dev.jar:na]
    at java.lang.Thread.run(UnkNown Source) ~[na:1.8.0_231]
Caused by: java.lang.RuntimeException: Error scanning entry meta-inf/versions/9/javax/xml/bind/ModuleUtil.class from jar file:/C:/local/ws/new/web/internal/internal-war/target/webtest/WEB-INF/lib/jaxb-api-2.3.1.jar
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:913) ~[gwt-dev.jar:na]
    ... 6 common frames omitted
Caused by: java.lang.IllegalArgumentException: null
    at org.objectweb.asm.ClassReader.<init>(UnkNown Source) ~[gwt-dev.jar:na]
    at org.objectweb.asm.ClassReader.<init>(UnkNown Source) ~[gwt-dev.jar:na]
    at org.objectweb.asm.ClassReader.<init>(UnkNown Source) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:973) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:956) ~[gwt-dev.jar:na]
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909) ~[gwt-dev.jar:na]

解决方法

您在gwt中拥有的Jetty版本与JEP-238(MultiRelease)jar文件不兼容。

特别是这个...

从jar文件中扫描条目META-INF / versions / 9 / javax / xml / bind / ModuleUtil.class时出错:/ C:/ local / ws / new / web / internal / internal-war / target / webtest / WEB-INF / lib / jaxb-api-2.3.1.jar

您需要使用具有Jetty 9.4.9或更高版本的gwt来支持JEP-238 jar文件。

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