gpt4 book ai didi

google-app-engine - 由于 HashMap$Entry ClassNotFound 错误,Grails 应用程序无法在 GoogleAppEngine 中运行

转载 作者:行者123 更新时间:2023-12-04 16:19:53 29 4
gpt4 key购买 nike

我正在尝试将我的 Grails 项目移植到 GAE,现在它支持 Cloud SQL。我没有使用 Grails App Engine 插件,因为它似乎不支持 Cloud SQL(毕竟它是相当新的)。我能够设法让我的 Grails 项目在 Google Java 开发服务器下的本地主机上运行,​​并且一切正常。但是在我将应用程序上传到 Google Appspot 之后,应用程序无法初始化,引用 ClassNotFound for java.util.HashMap$Entry。我的直觉是,groovy 增强的 Hashmap 类使用了 App Engine 不允许的一些功能,因此阻止了它的加载。但我是一个 groovy 新手,所以真的不知道从哪里开始挖掘 Groovy。

堆栈跟踪:

Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@92af24{/,/base/data/home/apps/fluentifyme/1.357352126538464031}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: Unable to get members for class groovy.util.ConfigObject
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:202)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:171)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:123)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:422)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:251)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.SecurityException: Unable to get members for class groovy.util.ConfigObject
at java.security.AccessController.doPrivileged(AccessController.java:34)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:449)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:455)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:695)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:333)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:325)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:453)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
... 10 more
Caused by: java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry;
at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
at java.lang.Class.getDeclaredMethods(Class.java:1808)
... 10 more
Caused by: java.lang.ClassNotFoundException: java.util.HashMap$Entry
... 10 more

最佳答案

您似乎遇到了 this reported bug与 ConfigSlurper 和 GAE 的安全限制相关。正如错误所建议的那样,您可以切换到使用 JsonSlurper 来解决此问题。

关于google-app-engine - 由于 HashMap$Entry ClassNotFound 错误,Grails 应用程序无法在 GoogleAppEngine 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9625077/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com