Issue
My app engine standard application was running till this morning and suddenly it won't run throwing the following error.
INFO: Overwriting system property key 'java.util.logging.config.file', value '/Users/sharon/Library/Application Support/google-cloud-tools-java/managed-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/config/sdk/logging.properties' with value 'WEB-INF/logging.properties' from '/Users/sharon/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/Lily/WEB-INF/appengine-web.xml'
2023-10-12 17:45:17.863:INFO::main: Logging initialized @768ms to org.eclipse.jetty.util.log.StdErrLog
2023-10-12 17:45:17.936:WARN:oejs.AbstractConnector:main: Ignoring deprecated socket close linger time
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/apphosting/runtime/SessionStore
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at com.google.appengine.tools.development.DevAppServerClassLoader.loadClass(DevAppServerClassLoader.java:117)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at com.google.apphosting.runtime.jetty9.SessionManagerHandler.create(SessionManagerHandler.java:75)
at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:360)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:293)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:42)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:102)
at com.google.appengine.tools.development.Modules.startup(Modules.java:118)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:280)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:57)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:229)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:227)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:381)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:58)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:239)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:230)
Caused by: java.lang.ClassNotFoundException: com.google.apphosting.runtime.SessionStore
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at com.google.appengine.tools.development.DevAppServerClassLoader.loadClass(DevAppServerClassLoader.java:117)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 28 more
I don't understand what the error means. What could be the reason? I noticed that it is happening after I upgraded the gcloud sdk version to 45.0.0 but I created another app engine standard application and it works fine.
Solution
This appears to be a bug or regression in cloud sdk 450.0.0 released 2023-10-10 https://cloud.google.com/sdk/docs/release-notes
Specifically:
App Engine Updated the Java SDK to version 2.0.20 build from the open source project
We were able to get local dev server working by pinning the cloudSdk version in our build.gradle file:
appengine {
// Configure the Cloud SDK version
tools {
cloudSdkVersion = '449.0.0'
}
...etc
Answered By - Spencer Alexander
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.