GWT 2.9, JDK 11 project upgrade issue: HTTP ERROR: 503: SERVICE_UNAVAILABLE

1,076 views
Skip to first unread message

Ying Jin

unread,
Jun 24, 2021, 10:56:28 PM6/24/21
to GWT Users
Thanks in advance for your time to help with this issue.

After much hard work, we finally resolved all of the errors related to the GWT compilation process for our application upgraded from GWT 2.5 to 2.9, from JDK 8 to JDK 11. 

However, when I run the application with "Run as -> GWT development mode with Jetty",
I got the following error and warning:

I searched online for the error highlighted below and the post said this error can be ignored. When we created ear file and deployed it to Weblogic server 14 and it gave 
HTTP ERROR: 503: SERVICE_UNAVAILABLE

It would be great if you can help shed some light on this issue.

Running CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, C:\Users\jiny\gitTestUpgrade\aries\war, -logLevel, INFO, -style, OBFUSCATED, edu.vanderbilt.mc.aries.ARIES]
Super Dev Mode starting up
   workDir: C:\Users\jiny\AppData\Local\Temp\gwt-codeserver-15364372133406537389.tmp
   Loading Java files in edu.vanderbilt.mc.aries.ARIES.
   Ignored 9 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
   Module setup completed in 4592 ms

The code server is ready at http://127.0.0.1:9876/
Code server started in 4.878 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)
Starting Jetty on port 8888
   [WARN] 
java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
at org.eclipse.jetty.annotations.ClassInheritanceHandler.addToInheritanceMap(ClassInheritanceHandler.java:72)
at org.eclipse.jetty.annotations.ClassInheritanceHandler.handle(ClassInheritanceHandler.java:58)
at org.eclipse.jetty.annotations.AnnotationParser$MyClassVisitor.visit(AnnotationParser.java:480)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:533)
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.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.base/java.lang.Thread.run(Thread.java:834)
   [WARN] Failed startup of context c.g.g.d.s.j.WebAppContextWithReload@491dfd8e{/,file:/C:/Users/jiny/gitTestUpgrade/aries/war/,STARTING}{C:\Users\jiny\gitTestUpgrade\aries\war}
java.lang.RuntimeException: Error scanning entry module-info.class from jar file:/C:/Users/jiny/gitTestUpgrade/aries/war/WEB-INF/lib/jakarta.xml.soap-api-1.4.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.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM6
at org.objectweb.asm.ClassVisitor.visitModule(ClassVisitor.java:130)
at org.objectweb.asm.ClassReader.readModuleAttributes(ClassReader.java:724)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:544)
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.parseJarEntry(AnnotationParser.java:956)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
... 6 more
[ERROR] 503 - GET /ARIES.html (127.0.0.1) 298 bytes
   Request headers
      Host: 127.0.0.1:8888
      Connection: keep-alive
      sec-ch-ua: " Not;A Brand";v="99", "Microsoft Edge";v="91", "Chromium";v="91"
      sec-ch-ua-mobile: ?0
      Upgrade-Insecure-Requests: 1
      User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 Edg/91.0.864.54
      Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
      Sec-Fetch-Site: none
      Sec-Fetch-Mode: navigate
      Sec-Fetch-User: ?1
      Sec-Fetch-Dest: document
      Accept-Encoding: gzip, deflate, br
      Accept-Language: en-US,en;q=0.9
   Response headers
      Date: Fri, 25 Jun 2021 02:01:02 GMT
      Cache-Control: must-revalidate,no-cache,no-store
      Content-Type: text/html; charset=ISO-8859-1
      Content-Length: 298
[ERROR] 503 - GET /favicon.ico (127.0.0.1) 299 bytes
   Request headers
      Host: 127.0.0.1:8888
      Connection: keep-alive
      sec-ch-ua: " Not;A Brand";v="99", "Microsoft Edge";v="91", "Chromium";v="91"
      sec-ch-ua-mobile: ?0
      User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 Edg/91.0.864.54
      Accept: image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
      Sec-Fetch-Site: same-origin
      Sec-Fetch-Mode: no-cors
      Sec-Fetch-Dest: image
      Accept-Encoding: gzip, deflate, br
      Accept-Language: en-US,en;q=0.9
   Response headers
      Date: Fri, 25 Jun 2021 02:01:02 GMT
      Cache-Control: must-revalidate,no-cache,no-store
      Content-Type: text/html; charset=ISO-8859-1
      Content-Length: 299

thanks,
Jenny

Jens

unread,
Jun 25, 2021, 6:01:19 AM6/25/21
to GWT Users

The code server is ready at http://127.0.0.1:9876/
Code server started in 4.878 s ms
[ERROR] jreLeakPrevention.gcDaemonFail
java.lang.ClassNotFoundException: sun.misc.GC

This can be ignored. GWT's class JettyLauncher tries to fix a class loader memory leak within sun.misc.GC but this class does not exist in that package in Java 11. The exception is catched and logged as error, but code will continue.


java.lang.RuntimeException: Error scanning entry module-info.class from jar file:/C:/Users/jiny/gitTestUpgrade/aries/war/WEB-INF/lib/jakarta.xml.soap-api-1.4.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.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.UnsupportedOperationException: This feature requires ASM6
at org.objectweb.asm.ClassVisitor.visitModule(ClassVisitor.java:130)
at org.objectweb.asm.ClassReader.readModuleAttributes(ClassReader.java:724)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:544)
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.parseJarEntry(AnnotationParser.java:956)
at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:909)
... 6 more


The embedded Jetty provided by GWT's DevMode class is too old to handle module-info.class files correctly during class file scanning. It basically requires newer ASM version.

The recommend approach for anything other than a small demo app is to not use the embedded Jetty provided by GWT DevMode. Instead use your own Jetty installation or a Jetty plugin for Gradle/Maven to deploy the server side part of your app. Or even better use the same application server that you are also using in production to minimize development/production differences. Once you do that you can also directly use GWT's CodeServer class without going through DevMode class. This will also remove the error log regarding sun.misc.GC.

There is also a discussion in https://groups.google.com/g/google-web-toolkit-contributors/c/iU9hckIab2o to gather feedback wether or not GWT should remove embedded Jetty support. It makes configuring a server more complex but you also don't run into a situation where everything seems to look right, but still it does not work, as in your case.

-- J.


Ying Jin

unread,
Jun 25, 2021, 3:19:13 PM6/25/21
to GWT Users
Thanks a lot for your explanation. 

The thing that puzzled me was that the HTTP 503 error generated when the ear file was deployed to Weblogic 14 server. If the error and warning can be ignored, why did we encounter this HTTP 503 error? What is the best way to figure out what caused this server error?

Currently, I'm working on installing WebLogic server 14 my in Eclipse for local deployment, however, I'm not sure if this is a better way for our local development as I don't have much experience with Weblogic server. The production WebLogic server on Linux is maintained by another group. 

Would Jetty or Tomcat server be a better choice in terms of easy configuration etc.? If so, we should install the latest version, right?

Your help is much appreciated,
Jenny 

Jens

unread,
Jun 30, 2021, 5:42:45 PM6/30/21
to GWT Users
Currently, I'm working on installing WebLogic server 14 my in Eclipse for local deployment, however, I'm not sure if this is a better way for our local development as I don't have much experience with Weblogic server. The production WebLogic server on Linux is maintained by another group.  

Would Jetty or Tomcat server be a better choice in terms of easy configuration etc.? If so, we should install the latest version, right?

If your server side code does not need a complete Java EE 8 server then you could also use Jetty/Tomcat. Since WebLogic 14 supports Servlet API 4.0 your Jetty/Tomcat version should also support it. So for Jetty you would choose Jetty 10.x.

Jetty is relatively easy to configure, all you need to do is activating the modules/plugins you need. To deploy a *.war file to Jetty you would need the server, http and deploy module. You can basically do the quick setup in their documentation: https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-quick-setup

If you don't want to copy your war file into the jetty-base/webapps folder you could instead place a xml file into that folder which tells jetty where to find the *.war file, see: https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-deploy-jetty . Since Jetty can deploy exploded war folders that xml file could point directly to C:/Users/jiny/gitTestUpgrade/aries/war

-- J.


Ying Jin

unread,
Jul 1, 2021, 1:21:51 PM7/1/21
to GWT Users
Jens, Thanks very much for your help! We'll follow the instructions in the guide you provided for further configuration. have a great rest of the week! Jenny
Reply all
Reply to author
Forward
0 new messages