我正在使用jetty(9.4.12(在macOS(Java 11(上为我的Web应用程序提供服务。
尽管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$1.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$1.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$1.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字节码扫描4天前刚刚合并(2018年11月1日(。
https://github.com/eclipse/jetty.project/issues/2941
Eclipse Jetty项目正在等待Asm 7.0最终版本(于2018年10月27日发布(的发布,以便正确扫描Java 11字节码。
即将发布的Jetty 9.4.13应该包含此修复程序。
在此期间,您可以:
- 使用quickstart在构建时生成扫描结果,完全跳过运行时字节码扫描步骤。一些用户报告说,这对他们来说效果很好(甚至改善了他们的启动时间(
- 或使用Jetty 9.4.13-SNAPSHOThttps://oss.sonatype.org/content/repositories/jetty-snapshots/(直到9.4.13最终发布(
- 针对Java 8构建类(直到9.4.13最终版本可用为止(
在输出准确的错误时也发生了类似的情况,但在Anypoint Studio 中的Mule API中
Jetty(9.4.12(:上下文启动失败o.e.j.w.WebAppContext@2af004bwebapp/,不可用
我已经确定了这个问题的原因,并通过在pom.xml文件中的mule-maven插件中添加一个具有正确groupId
和artifactId
的共享库来修复它,尽管我已经在<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插件。我不确定你的平台依赖于哪个webApp。所以,相应地放置你的共享库。