GWT New Project doesn't start because of Jetty problems.

243 views
Skip to first unread message

Victor Colina

unread,
Oct 28, 2023, 2:03:16 PM10/28/23
to GWT Users
Hello. I'm trying to create a new GWT Project in Eclipse following the official tutorial. I'm using GWT 2.9 + JDK 11. I create the project with the plug in in eclipse but I can't debug the app like the tutorial said. 

Loading Java files in com.ve.siaconca.AutoSys.

Module setup completed in 5740 ms

2023-10-28 13:34:15.138:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT

2023-10-28 13:34:15.212:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@1eb918ed{/,null,AVAILABLE}

2023-10-28 13:34:15.268:INFO:oejs.ServerConnector:main: Started ServerConnector@37c5c9b9{HTTP/1.1}{127.0.0.1:9876}

2023-10-28 13:34:15.269:INFO:oejs.Server:main: Started @8336ms


The code server is ready at http://127.0.0.1:9876/

Code server started in 6.471 s ms

[ERROR] jreLeakPrevention.gcDaemonFail

java.lang.ClassNotFoundException: sun.misc.GC

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:315)

at com.google.gwt.dev.shell.jetty.JettyLauncher.jreLeakPrevention(JettyLauncher.java:899)

at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:722)

at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:636)

at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:898)

at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:705)

at com.google.gwt.dev.DevMode.main(DevMode.java:432)

2023-10-28 13:34:15.591:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT

Starting Jetty on port 8888

2023-10-28 13:34:18.199:INFO:oejs.ServerConnector:main: Started ServerConnector@677e3282{HTTP/1.1}{127.0.0.1:8888}

2023-10-28 13:34:18.202:INFO:oejs.Server:main: Started @11268ms

[WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@6cc8136b{/,file:/C:/Users/VICTOR/eclipse-workspace/AutoSys/war/,STARTING}{C:\Users\VICTOR\eclipse-workspace\AutoSys\war}

MultiException[java.lang.RuntimeException: Error scanning file AutoSys$1.class, java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler.class, java.lang.RuntimeException: Error scanning file AutoSys.class]

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)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

at org.eclipse.jetty.server.handler.RequestLogHandler.doStart(RequestLogHandler.java:140)

at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)

at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)

at org.eclipse.jetty.server.Server.start(Server.java:387)

at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)

at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)

at org.eclipse.jetty.server.Server.doStart(Server.java:354)

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:898)

at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:705)

at com.google.gwt.dev.DevMode.main(DevMode.java:432)

Caused by: MultiException[java.lang.RuntimeException: Error scanning file AutoSys$1.class, java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler.class, java.lang.RuntimeException: Error scanning file AutoSys.class]

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:681)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:688)

at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:824)

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.base/java.lang.Thread.run(Thread.java:834)

Suppressed: java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler$1.class

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)

... 10 more

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)

at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)

... 10 more

Suppressed: java.lang.RuntimeException: Error scanning file AutoSys$1MyHandler.class

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)

... 10 more

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)

at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)

... 10 more

Suppressed: java.lang.RuntimeException: Error scanning file AutoSys.class

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)

... 10 more

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:660)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)

at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)

... 10 more

Caused by: java.lang.RuntimeException: Error scanning file AutoSys$1.class

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708)

... 10 more

Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7

at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:550)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:400)

at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:974)

at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:702)

... 10 more


that is the full Error. I haven't done anything to the project, I don't understand why

the error with the project.

Colin Alworth

unread,
Oct 29, 2023, 3:37:49 PM10/29/23
to GWT Users
There are a few options I would suggest:
 * Upgrade to GWT 2.10 (especially since this is a new project). This is probably the simplest and best option. The new version of Jetty used there will not have this issue with scanning module files.
 * Stop using DevMode as an application server - run your own server, using the servlet container of your choice, and either pass -noserver to DevMode, or switch to CodeServer. This is a good idea whether or not you upgrade to GWT 2.10.
 * Downgrade to Java8, or at least remove any dependency that uses Java9+ bytecode. This might be your own project, based on the error messages. This is probably a pretty terrible option, but if your brand new project can't use latest GWT, and it happens that you don't actually need that dependency and it solves the problem, then it might be acceptable. If you actually want the annotation configuration to take place, take one/both of the earlier options.
 * Finally, it is possible to extend JettyLauncher and further customize the types that Jetty will scan. Start by overriding createWebAppContext(), configure the instance created by the super call as desired, then pass -server com.mycompany.myserver.MyCustomJettyLauncher to dev mode when it starts to use this type instead of the built in type.

Victor Colina

unread,
Oct 30, 2023, 12:42:04 PM10/30/23
to GWT Users
Hello thanks for the response. I did change to gwt 2.10 and I'm using the Tomcat as the  servlet container like you said. I manage to do this steps http://gwt-plugins.github.io/documentation/gwt-eclipse-plugin/debugging/GWTDevModeAndTomcatWebServer.html I everything is fine until I go to the explorer and this page comes first. 

9876.png

I change the port and add the /AutoSys1-server/ like the tutorial said but this happens. 

8080.png


This are some info to give more context: 

debug-pro.png
debug.png

log.png

log2.png

Colin Alworth

unread,
Oct 30, 2023, 12:49:43 PM10/30/23
to GWT Users
At a glance, it appears that you started CodeServer rather than DevMode - but the default port would have been 8888 rather than 8080 if your app was hosted by DevMode.

Colin Alworth

unread,
Oct 30, 2023, 12:50:40 PM10/30/23
to GWT Users
Sorry, hit send too early - when using CodeServer, you should be sure to start your own tomcat - for whatever reason, that error message at localhost:8080 indicates that tomcat isn't running or isnt reachable at that port.

Victor Colina

unread,
Oct 30, 2023, 1:13:10 PM10/30/23
to GWT Users
Yeah you were right. It works now, the only thing is that it doesn't show the gwt elements in the page. 

imagen_2023-10-30_131300242.png

Reply all
Reply to author
Forward
0 new messages