Jetty(9.4.12):上下文启动失败 o.e.j.w.WebAppContext@2af004b webapp/,不可用

Jetty(9.4.12) : Failed startup of context o.e.j.w.WebAppContext@2af004b webapp/, UNAVAILABLE

我正在使用码头 (9.4.12) 在 macOS (Java 11) 上为我的网络应用程序提供服务。

虽然Jetty已经启动,但是服务仍然不可用。我一如既往地使用相同的 War 文件,但唯一的区别是,我已将 Java 从版本 10 更新到版本 11。是否有可能修复此问题?

错误

Failed startup of context o.e.j.w.WebAppContext@2af004b{jaltantra,/jaltantra,file:///private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/,UNAVAILABLE}{/jaltantra.war}
MultiException[java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/optimizer/Pipe.class, 
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/optimizer/Pipe$FlowType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/EPATool$NodeVariableType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/quality/QualitySim.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/quality/QualitySim.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/EPATool.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Link$LinkType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Control.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Curve.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Source.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Field$RangeType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/NUConvert.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Tank.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Link.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule$Rulewords.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Control$ControlType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Pump$Type.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Field.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Pump.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule$Values.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Link.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule$Objects.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule$Operators.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Rule$Varwords.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Curve$Coeffs.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Tank$MixType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Source$Type.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Link$StatType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/Curve$CurveType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/structures/NUConvert.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/PropertiesMap$FlowUnitsType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/PropertiesMap$Hydtype.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/Network$FileType.class
java.lang.RuntimeException: Error scanning file /private/var/folders/s8/sgl02rb122xcl3bfc22wtfch0000gn/T/jetty-0.0.0.0-8080-jaltantra.war-_jaltantra-any-4267422187513106243.dir/webapp/WEB-INF/classes/org/addition/epanet/network/PropertiesMap.class

扫描 Java 11 字节码只是 merged 4 days ago(2018 年 11 月 1 日)。

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

Eclipse Jetty 项目正在等待 Asm 7.0 final(2018 年 10 月 27 日发布)的发布,以便可以正确扫描 Java 11 个字节码。

即将发布的 Jetty 9.4.13 版本应包含此修复程序。

在此期间,您可以:

  • 使用quickstart在构建时生成扫描结果,完全跳过运行时字节码扫描步骤。一些用户报告说这对他们来说效果很好(甚至缩短了他们的启动时间)。
  • 或使用 https://oss.sonatype.org/content/repositories/jetty-snapshots/ 的 Jetty 9.4.13-SNAPSHOT(直到发布最终的 9.4.13 版本)
  • 针对 Java 8 构建您的 类(直到最终的 9.4.13 版本可用)

确切的错误输出发生了类似的事情,但是在 Anypoint Studio 的 Mule API 中

Jetty(9.4.12) : Failed startup of context o.e.j.w.WebAppContext@2af004b webapp/, UNAVAILABLE

我已经确定了这个问题的原因,并通过在 pom.xml 文件的 mule maven 插件中添加一个具有正确 groupIdartifactId 的共享库来修复它,尽管我已经在 <dependencies> 部分中指定了 JMS 连接器依赖项。

对于任何类似情况,我建议首先在 pom/maven 中添加以下代码并重新测试

<plugin>
    <groupId>org.mule.tools.maven</groupId>
    <artifactId>mule-maven-plugin</artifactId>
    <version>${mule.maven.plugin.version}</version>
    <extensions>true</extensions>
    <configuration>
        <sharedLibraries>
            <sharedLibrary>
                <groupId>34542e45-3432-234e-f45d-345r44533d323</groupId>
                <artifactId>activemq</artifactId>
            </sharedLibrary>
        </sharedLibraries>
    </configuration>
</plugin>

对我来说,它是 mule-maven-plugin。我不确定您的平台依赖于哪个 webApp。因此,相应地放置您的 sharedLibrary。