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.
On Saturday, October 28, 2023 at 1:03:16 PM UTC-5 lelo...@gmail.com wrote:
> 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
>
> 2023-10-28 13:34:18.199:INFO:oejs.ServerConnector:main: Started
> ServerConnector@677e3282{HTTP/1.1}{127.0.0.1:}
>
> 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.Reque