How to change the version of Jetty in my Google App Engine

Viewed 107

Within IntelliJ I have a Google App Engine Standard Local Server running. I'm in the process of updating to Java 17 and also all of my 3rd party libraries and have moved to Jetty 11.0.11 in all of my project's pom files. However, when I start up the server I see: INFO:oejs.Server:main: jetty-9.4.46.v20220331 and I'm getting failures that seem to confirm the above, that an older version of Jetty is being used. Where can I update the Jetty version that the app engine uses? Also, I'm using Google appengine 2.0.5

Here's the stack trace. The latest versions should be using jakarta.ws.rs.Path instead of javax.

java.lang.TypeNotPresentException: Type javax.ws.rs.Path not present at java.base/sun.reflect.annotation.TypeNotPresentExceptionProxy.generateException(TypeNotPresentExceptionProxy.java:47) at java.base/sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:89) at jdk.proxy2/jdk.proxy2.$Proxy2.value(Unknown Source) at org.eclipse.jetty.annotations.AnnotationConfiguration.createServletContainerInitializerAnnotationHandlers(AnnotationConfiguration.java:579) at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:343) at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:498) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916) at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) at org.eclipse.jetty.server.Server.start(Server.java:423) at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97) at org.eclipse.jetty.server.Server.doStart(Server.java:387) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73) at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:366)

1 Answers

To update the Jetty version to the latest one, I would suggest updating the Cloud SDK to the latest version. Based on the documentation, the most recent release of Cloud SDK is version 395.0.0 (2022-07-26) and according to the release notes, the latest Java SDK version is 1.9.98 and latest Jetty version is 11.0.11

I would recommend trying to upgrade the Cloud SDK by following this documentation so the Jetty version is updated to the latest one.

EDIT: If you think it’s a valid feature request you may raise here with a clear description why you are thinking it’s a feature request. Good feature requests will solve common problems or enable new use cases.

Related