Upgrading GWT-based application - issues with JEP-238 (MultiRelease) jar files

58 views
Skip to first unread message

mmo

unread,
Jul 28, 2021, 3:11:02 PMJul 28
to GWT Users
I am trying to update the hibernate and spring versions used by a legacy application which uses GWT 2.8.1. Doing so I ran into an issue when starting the application using the GWT maven plugin's gwt:run or gwt:debug commands - see the error message at the bottom.
Some search results that I found regarding that error suggest that the embedded Jetty version has apparently issues with JEP-238 (MultiRelease) jar files (i.e. .jar files that contain Java 9+ module info files). The offending classmate-1.5.1.jar seems to be some transitive dependency of the jackson JSON library and seems to contains such module info data.
Another reference stated that Jetty from v9.4.9 onwards supports such multi-release .jar files.

But how can I replace the Jetty embedded in the GWT Maven plugin? Or is there some other way to work-around or fix this?
Would updating the GWT version to 2.8.2 or 2.9.0 solve this issue?

Below is the error message that I get when starting up my application:

...
[WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@797f1e2a{/,file:/D:/Projects/RW-Tool/code/rwtool/web/target/rwtool-web-1.8.5-SNAPSHOT/,STARTING}{D:\Projects\RW-Tool\code\rwtool\web\target\rwtool-web-1.8.5-SNAPSHOT}
org.eclipse.jetty.util.MultiException: Multiple exceptions
         at org.eclipse.jetty.annotations.AnnotationConfiguration.scanForAnnotations(AnnotationConfiguration.java:536)
         at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:447)
         at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:479)
         at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1337)
         at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
         at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
         at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:550)
         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
         .... some lines removed for brevity ...
         at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
         at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:760)
         at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:636)
         at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:923)
         at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:706)
         at com.google.gwt.dev.DevMode.main(DevMode.java:432)
 Caused by: java.lang.RuntimeException: Error scanning entry module-info.class from jar file:/D:/Projects/RW-Tool/code/rwtool/web/target/rwtool-web-1.8.5-SNAPSHOT/WEB-INF/lib/classmate-1.5.1.jar
         at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:913)
         at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
         at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
         at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
         at java.lang.Thread.run(Thread.java:748)
 Caused by: java.lang.IllegalArgumentException: null
         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
         at org.objectweb.asm.ClassReader.<init>(Unknown Source)
         at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:973)
         at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:956)
         at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
         at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:831)
         at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
         at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
         at java.lang.Thread.run(Thread.java:748)

Jens

unread,
Jul 29, 2021, 6:51:20 AMJul 29
to GWT Users
But how can I replace the Jetty embedded in the GWT Maven plugin? Or is there some other way to work-around or fix this?

You won't use the GWT Maven plugin to launch any GWT embedded Jetty. You would use a Maven Jetty plugin directly to deploy your server side code. Alternatively install Jetty on your host and tell it where to find *.war files (or exploded war directories) generated by maven.

 
Would updating the GWT version to 2.8.2 or 2.9.0 solve this issue?

No. Newest GWT uses embedded Jetty 9.2.x which does not support scanning module-info.class files.


-- J.

mmo

unread,
Aug 5, 2021, 11:05:33 AMAug 5
to GWT Users
Thanks for responding! Meanwhile I am deploying to a local Tomcat (which is the target server anyway, so this also spares us issues caused by differences of the two...).
Reply all
Reply to author
Forward
0 new messages