Error scanning entry “module-info.class” when starting Jetty server

module-info.class is a Java9 (JPMS) feature.

Jetty 9.4.9 (or newer) supports the new JAR file changes from Java 9.

It does not matter what Runtime JVM you are using (Oracle Java 8, or even something like OpenJDK 11.0.3), if you are using those JEP-238 Multi-Release Jar files in your WebApp (or Server classloader) then you are required to upgrade your Jetty version to Jetty 9.4.x.

This is because of the bytecode scanning requirement that Servlet 3.x introduces. Jetty is required to scan all JAR files for possible servlet annotations or references that match your webapp defined @HandlesTypes. Once JEP-238 became a reality, this bytecode scanning layer had to be adapted/updated/fixed to support these new JAR file structures. Jetty 9.4.9 was the first version of Jetty to support these new JAR file structures during bytecode scanning.

Issues about Java 9 features:

Leave a Comment