0

I have a legacy app written in Java 8, built for Google App Engine, which had been using Jackson 2.3. Now I need to update the app to use Jackson 2.10. However, once I do so, the app's webservices (which had previously been working) won't return anything except a 503 page saying "503" and "Powered by Jetty://9.4.36v20210114".

The logs display no errors. All that they say is

com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext disableTransportGuarantee
INFO: Ignoring <transport-guarantee> for /my/endpoint/* as the SDK does not support HTTPS.  It will still be used when you upload your application.

which is a completely normal and expected message.

My dependency tree shows no reference to Jetty. I'm not sure what that means; is Jetty built into the JDK now or something?

Does anyone have any idea what might be causing this? or how to debug it?

Mathew Alden
  • 1,458
  • 2
  • 15
  • 34
  • https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.10#2100pr1-on-jdk-8-module-info it seems that more issues have happened with jetty. Check here and if possible consider upgrading jetty version – Panagiotis Bougioukos Feb 22 '21 at 22:04
  • @Boug Thanks, I should've thought to read the changelog. – Mathew Alden Feb 22 '21 at 22:07
  • @Boug that issue was solved in Jetty years ago. https://stackoverflow.com/a/45362629/775715 – Joakim Erdfelt Feb 22 '21 at 22:12
  • I didn't say it was exactly that issue. I said that also other issues have happened with Jetty 9 and maybe it is time for upgrade considering that it breaks again. Thanks for posting also the relevant answer for that issue so I could now know – Panagiotis Bougioukos Feb 22 '21 at 22:15
  • @Boug I updated my question; afaict I'm using Jetty://9.4.36v20210114, so I believe that's already up-to-date. – Mathew Alden Feb 22 '21 at 22:26
  • It can be difficult to figure out the problem if there's no repro steps included. My suggestion if there's no actionable information on the logs is to file a ticket if you have free trial or paid support package on your account. https://cloud.google.com/support-hub – Donnald Cucharo Feb 23 '21 at 06:08

1 Answers1

1

Turns out the issue wasn't with Jetty.

There was actually an error message, I just didn't see it at first. The error was

java.lang.ClassNotFoundException: com.fasterxml.jackson.annotation.JsonInclude$Value
 at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
 at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:209)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
 at java.lang.Class.getDeclaredMethods(Class.java:1975)
...

I don't completely understand why, but adding the following to my POM fixed the issue.

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-annotations</artifactId>
    <version>2.10.5</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.10.5</version>
</dependency>
Mathew Alden
  • 1,458
  • 2
  • 15
  • 34