I'm trying to update my project to Java 11 - OpenJDK_11.0.2 (currently on Java 8). I am using runjettyrun
with Jetty version 9.4.8.v20171121.
I can run the project without any issues on Java 8, but if I switch to Java 11, I'll get the following error message:
MultiException[java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/InventoryItemWithEnum.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/NeededItem.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/InventorySnapshot.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/InventoryItemAmount.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/TransferOrders.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/ItemSets.class, java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../entities/SearchSerialnumberView.class]
| at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:717)
| at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:832)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:161)
| at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:468)
| at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
| at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
| at java.base/java.lang.Thread.run(Thread.java:834)
|Suppressed:
| |java.lang.RuntimeException: Error scanning file /Users/.../target/classes/.../enumerations/Location.class
| | at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:746)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:832)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:161)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:468)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
| | at java.base/java.lang.Thread.run(Thread.java:834)
| |Caused by:
| |java.lang.IllegalArgumentException
| | at org.objectweb.asm.ClassReader.<init>(ClassReader.java:160)
| | at org.objectweb.asm.ClassReader.<init>(ClassReader.java:143)
| | at org.objectweb.asm.ClassReader.<init>(ClassReader.java:418)
| | at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:933)
| | at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:740)
| | at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:832)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:161)
| | at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:468)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
| | at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
| | at java.base/java.lang.Thread.run(Thread.java:834)
You must upgrade your version of Jetty.
9.4.9 was the first version to support Java 9.
Error scanning entry "module-info.class" when starting Jetty server
9.4.13 was the first version to support Java 11.
Spring: Migrating to OpenJDK-10 not working, mvn install is working
You want to be on 9.4.40, as versions below 9.4.39 are vulnerable in different ways.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.