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

490 views
Skip to first unread message

Mike Wallace

unread,
Jul 28, 2022, 12:35:33 PM7/28/22
to Google App Engine

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 GAE 2.0.5 and 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? 

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)

Andrés Márquez

unread,
Jul 28, 2022, 5:00:25 PM7/28/22
to Google App Engine

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


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


[1] https://cloud.google.com/sdk/docs/release-notes

[2] https://cloud.google.com/appengine/docs/standard/java/release-notes
[3] https://www.eclipse.org/jetty/download.php

[4] https://cloud.google.com/sdk/docs/components#updating_components

Ludovic Champenois

unread,
Jul 31, 2022, 8:42:34 AM7/31/22
to 'Mike Wallace' via Google App Engine

For java 17 bundled services (configured via appengine-web.xml not app.yaml) the jetty version is provided (managed plaform) and cannot be changed.

For non bundled services (app.yaml configuration) whatever web server of the market can be used including latest jetty versions.

Ludo

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/3ec6a90b-9617-480e-9771-3a39f941c576n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages