Since version 9.0.38 tomcat-embedded-core is no longer usable in a jpms module context. Following exception occurs at startup: Caused by: java.util.ServiceConfigurationError: org.apache.juli.logging.Log: module org.apache.tomcat.embed.core does not declare `uses` at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588) ~[na:na] at java.base/java.util.ServiceLoader.checkCaller(ServiceLoader.java:574) ~[na:na] at java.base/java.util.ServiceLoader.<init>(ServiceLoader.java:503) ~[na:na] at java.base/java.util.ServiceLoader.load(ServiceLoader.java:1691) ~[na:na] at org.apache.tomcat.embed.core@9.0.38/org.apache.juli.logging.LogFactory.<init>(LogFactory.java:89) ~[tomcat-embed-core-9.0.38.jar:na] at org.apache.tomcat.embed.core@9.0.38/org.apache.juli.logging.LogFactory.<clinit>(LogFactory.java:66) ~[tomcat-embed-core-9.0.38.jar:na] at org.apache.tomcat.embed.core@9.0.38/org.apache.catalina.core.AprLifecycleListener.<clinit>(AprLifecycleListener.java:48) ~[tomcat-embed-core-9.0.38.jar:na] at spring.boot@2.3.4.RELEASE/org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getDefaultLifecycleListeners(TomcatServletWebServerFactory.java:167) ~[spring-boot-2.3.4.RELEASE.jar:na] The ServiceLoader API is used, but this is not correctly declared in the module-info.java file.
Thanks for the report. This looks like a regression in 64548. I have this issue fixed locally but that has uncovered another issue (Jasper is required). I'm currently working on the Jasper issue.
Fixed in: - master for 10.0.0-M9 onwards - 9.0.x for 9.0.39 onwards You may want to build with source and test this. I checked the very obvious but I wouldn't be surprised if there were other code paths that had issues under JPMS.
I did a quick test with the 9.0.x branch. All our application tests are running again, and [Apache Tomcat/9.0.39-dev] started successfully. I will do some more testing over the weekend and let you know when I run into other problems.
Nice fix markt!