tbroyer / gwt-maven-plugin

Starting fresh on building GWT projects with Maven
https://tbroyer.github.io/gwt-maven-plugin/
Apache License 2.0
166 stars 39 forks source link

org.objectweb.asm.ClassReader Caused by: java.lang.ArrayIndexOutOfBoundsException: 18308 #132

Closed zhivko closed 5 years ago

zhivko commented 5 years ago

After running

mvn gwt:devmode

I'm getting jetty error like this: Any idea what coud be wrong? Googling around for solution it seems upgrading to jetty 9.3.x would solve it.

Any idea what is wrong in my configuration?

00:00:02.905 [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@3e024667{/,file:/home/klemen/workspace/WebUi2/target/gwt/devmode/war/,STARTING}{/home/klemen/workspace/WebUi2/target/gwt/devmode/war} java.lang.RuntimeException: Error scanning file LoginServiceImpl.class at org.eclipse.jetty.annotations.AnnotationParser.parseDir(AnnotationParser.java:708) 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.lang.Thread.run(Thread.java:748) Caused by: java.lang.ArrayIndexOutOfBoundsException: 18308 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.parseDir(AnnotationParser.java:702) 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.lang.Thread.run(Thread.java:748)

tbroyer commented 5 years ago

gwt:devmode is a crutch. Use gwt:codeserver and, say, the Jetty Maven plugin; even better, restructure your project to split client and server code into separate Maven modules. You can use https://github.com/tbroyer/gwt-maven-archetypes as an inspiration or starting point.

In any case, this is a (known) GWT limitation, not directly related to this plugin.

zhivko commented 5 years ago

I indeed followed archetype creation and have multimode maven project in place. Now with gwt:codeserver & I see codeserver started - but webserver is not listening on any port - where is webpart - or how would one tipically debug also webpart?

I used maven-resources-plugin to copy ${basedir}/target/gwt/codeserver so web files are there but no web server serves them... ?

Here is output: ... [INFO] Turning off precompile in incremental mode. [INFO] Super Dev Mode starting up [INFO] workDir: /home/klemen/workspace/WebUi2/target/gwt/codeserver [WARNING] 2019-08-09 13:52:49.267:INFO::main: Logging initialized @2018ms [INFO] Loading Java files in si.telekom.erender.webui2.WebUi2. [INFO] Module setup completed in 2926 ms [WARNING] 2019-08-09 13:52:50.676:INFO:oejs.Server:main: jetty-9.2.14.v20151106 [WARNING] 2019-08-09 13:52:50.702:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@70fda9bf{/,null,AVAILABLE} [WARNING] 2019-08-09 13:52:50.713:INFO:oejs.ServerConnector:main: Started ServerConnector@3d68c438{HTTP/1.1}{127.0.0.1:9876} [WARNING] 2019-08-09 13:52:50.714:INFO:oejs.Server:main: Started @3465ms [INFO] [INFO] The code server is ready at http://127.0.0.1:9876/

Code available at: https://github.com/zhivko/WebUi2

tbroyer commented 5 years ago

Everything should be in the archetypes' readme; use mvnDebug jetty:run instead of mvn jetty:run to debug your server-side code (use a remote debug configuration in your IDE to connect to the Jetty process, and start setting breakpoints).