Is there any way to use GWT 2.9 with Java 11 using Eclipse GWT plugin?

960 views
Skip to first unread message

Shahram Zadeh

unread,
Jul 27, 2020, 6:11:58 PM7/27/20
to GWT Users

We have a huge GWT project (GWT 2.7, JDK 1.7, Eclipse) everything works perfect. We are planning to upgrade to Java 11 and GWT 2.9 which has been recently released. However Java 1.7 is retiring and getting obsolete we have to move on and upgrade. Since last week we are trying to create a development environment like the existing one but there is no success. I was wondering whether anyone out there is struggling with the same issue, any hint, solution or hacking the eclipse plugin would be greatly appreciated.

Eclipse plugin comes with GWT (2.7 and 2.8.1)

Michael Conrad

unread,
Jul 27, 2020, 6:42:13 PM7/27/20
to google-we...@googlegroups.com
I use Gradle to configure Eclipse.
For JDK11 to be used as if it were JDK8 in Eclipse I have added:

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
if (JavaVersion.current() > JavaVersion.VERSION_1_8) {
tasks.withType(JavaCompile) {
   options.compilerArgs.addAll(["--release", "8"])
}
}

On Mon, Jul 27, 2020 at 6:12 PM Shahram Zadeh <shahra...@gmail.com> wrote:

We have a huge GWT project (GWT 2.7, JDK 1.7, Eclipse) everything works perfect. We are planning to upgrade to Java 11 and GWT 2.9 which has been recently released. However Java 1.7 is retiring and getting obsolete we have to move on and upgrade. Since last week we are trying to create a development environment like the existing one but there is no success. I was wondering whether anyone out there is struggling with the same issue, any hint, solution or hacking the eclipse plugin would be greatly appreciated.

Eclipse plugin comes with GWT (2.7 and 2.8.1)

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/1bdedb59-090d-4c8c-ba72-258e991ae060n%40googlegroups.com.

Shahram Zadeh

unread,
Jul 27, 2020, 8:24:41 PM7/27/20
to GWT Users
Thanks for the prompt response.
The issue is the internal Jetty that cannot be loaded with openJdk 11. Here is the log.
Is there any way to replace the internal Jetty with a higher version?  I Checked the Jetty forum and apparently they are aware of this.

The code server is ready at http://127.0.0.1:9876/
Code server started in 20.11 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:522)
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)
2020-07-27 15:36:29.138:INFO:oejs.Server:main: jetty-9.2.z-SNAPSHOT
Starting Jetty on port 8888
   [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@8953a7d{/,file:/C:/Eclipse_WP_Java11/Rguroo/war/,STARTING}{C:\Eclipse_WP_Java11\Rguroo\war}
MultiException[java.lang.RuntimeException: Error scanning file Rguroo$1.class, java.lang.RuntimeException: Error scanning file Rguroo$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file Rguroo$1MyHandler.class, java.lang.RuntimeException: Error scanning file Rguroo.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 Rguroo$1.class, java.lang.RuntimeException: Error scanning file Rguroo$1MyHandler$1.class, java.lang.RuntimeException: Error scanning file Rguroo$1MyHandler.class, java.lang.RuntimeException: Error scanning file Rguroo.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 Rguroo$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 Rguroo$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 Rguroo.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 Rguroo$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
2020-07-27 15:36:31.285:INFO:oejs.ServerConnector:main: Started ServerConnector@21421b3{HTTP/1.1}{127.0.0.1:8888}
2020-07-27 15:36:31.285:INFO:oejs.Server:main: Started @23499ms

lofid...@gmail.com

unread,
Aug 6, 2020, 5:56:59 PM8/6/20
to GWT Users
GWT Eclipse plugin is not maintained anymore... So to use the newest one you could move to pure Maven or Gradle... I only use Maven sofar and it works well...

Shahram Zadeh

unread,
Aug 7, 2020, 12:23:52 PM8/7/20
to google-we...@googlegroups.com
is there any documentation for how to set it up, we are not maven oriented. I appreciate a link or document...

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/l_E1Y8XKg7k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/c9461274-510c-4661-8a73-28ad39fc35ecn%40googlegroups.com.

Frank Hossfeld

unread,
Aug 8, 2020, 10:11:54 AM8/8/20
to GWT Users
Use this to generate a multi module artifact:

Shahram Zadeh

unread,
Aug 27, 2020, 2:30:45 PM8/27/20
to GWT Users
after a long time and hard work we were able to make it work up to the successful compilation, now there is a conflict between the integrated apache  xerces in gwt-dev.jar and java 8.
is there any way to force the GWT in dev mode not to use tools in the gwt-dev.jar?

any help would be greatly appreciated.


org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration



java.lang.ClassCastException: org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.parsers.SAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getXMLReader(UnmarshallerImpl.java:144)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:162)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:171)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:189)
at com.soflytics.rguroo.server.util.ServerUtility.readGUIComponents(ServerUtility.java:175)

Thomas Broyer

unread,
Aug 28, 2020, 10:34:44 AM8/28/20
to GWT Users
That one's "easy": don't use the embedded Jetty of DevMode; run your own servlet container instead, along with either DevMode in -noserver mode, or CodeServer.

Shahram Zadeh

unread,
Aug 30, 2020, 9:25:08 PM8/30/20
to google-we...@googlegroups.com
Thanks Thomas for your prompt response, I loaded the old project and added the old jars one by one and after apache commons it started working, I mean it stopped using the gwt-dev.jar libraries.
Now I'm able to load the application with
1)   Eclipse plugin, using the integrated Server jetty-9.2.z-SNAPSHOT, 
2)   AdoptOpenJdk Java 8 
3)   GWT 2.9
4)   SDBG debugger stops at breakpoints, it's interesting that it shows the real variable names like the old times legacy Dev Mode however, it doesn't show the function names :-(
       is there any solution for that because we don't want to use the chrome debugger.

Oh my Goodness,  GWT 2.9 compiler is extremely serious and much faster. We need to add null checks in lots of places because NullPointerException was not a problem for 2.7
it could internally handle it but 2.9 is killing us. It was a great success that we reached this point. The next step is DB migration to oracle 19c.

I would appreciate a solution for SDBG. Another question is how to find and manipulate the CodeServer parameters, we are thinking about replacing Jetty with Tomcat for development.

I appreciate it in advance.
Shahram...





lofid...@gmail.com

unread,
Aug 31, 2020, 4:34:29 PM8/31/20
to GWT Users
Hi, great to hear that you managed to move to GWT 2.9...

AFAIK, SDBG is implemented based on Chrome, so actually it is the same whether you use Chrome or SDBG in Eclipse, only it looks more integrated in Eclipse 😀 

lofid...@gmail.com

unread,
Aug 31, 2020, 4:43:02 PM8/31/20
to GWT Users
... and for development: it is wise to separate your GWT UI project from your server part:
  • Separate the Maven modules: one for server and one for client GWT UI, don't mixed both modules.
  • Develop both modules independently, mock your server to be able to make a fast turn around time for your UI development.
  • Take the result of your client module which are HTML, CSS, JS and put it on the server module to have it deployed. 
So if you are doing this, you could just use the Jetty server which are standard in GWT libs and later you put your result on your "real server" which could be Tomcat or whatever...

I have some examples which use the mechanism above. But for this you should move to Maven: https://github.com/gwtboot/domino-rest-enum-date

IMHO no other way, you need Maven 😉

Hope this helps.
shahra...@gmail.com schrieb am Montag, 31. August 2020 um 03:25:08 UTC+2:

Shahram Zadeh

unread,
Aug 31, 2020, 6:50:13 PM8/31/20
to google-we...@googlegroups.com
Yeah, we realized that chrome debugger and SDBG are the same, but it's a different world when your debug session is like a desktop application, you don't notice it's a Web application.
I checked the video how to separate the projects but unfortunately we cannot move to maven. 
We are very happy that GWT is not going to die. GWT is a miracle, in compare to other JS libraries. 

Thanks for your response and time.


Reply all
Reply to author
Forward
0 new messages