Grails application failed to start in GoogleAppEngine due to HashMap $ Entry ClassNotFound error

I am trying to push a Grails project to GAE, it now has Cloud SQL support. I haven't used the Grails Application Modules plugin because it doesn't seem to support Cloud SQL (it's pretty new after all). I was able to run a Grails project on localhost under Google Java Development Server and everything works. But after I uploaded my app to Google Appspot, the app was unable to initialize quoting ClassNotFound for java.util.HashMap $ Entry. I feel like the improved groovy Hashmap class used some functionality not available to App Engine and thus prevented it from loading. But I'm a groovy newbie so don't know where to start digging into Groovy.

StackTrace:

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

      

+3


source to share


1 answer


You seem to be facing this reported bug related to ConfigSlurper and GAE security restrictions. As the error shows, you can switch to using JsonSlurper to solve this problem.



0


source







All Articles