Grails无法运行simplecaptcha

时间:2018-01-11 14:22:09

标签: grails simplecaptcha

我是Java的新手,并且一直在努力让simplecaptcha与Grails合作,所以我可以查看给出的示例。我已经将我的grails版本回滚到2.0.0,否则Grails会抛出错误。在这样做之后,我不得不将$ JAVA_HOME变量(我正在运行Ubuntu 17.04)设置为/usr/lib/jvm/java-1.8.0-openjdk-amd64(我还尝试了/usr/lib/jvm/default-java/usr/lib/jvm/java-8-openjdk-amd64)。

尝试运行simplecaptcha示例时,出现以下错误:

~/Documents/simplecaptcha-code/examples/grails$ grails run-app
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

| Error java.lang.reflect.InvocationTargetException
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| Error     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error     at java.lang.reflect.Method.invoke(Method.java:498)
| Error     at com.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1231)
| Error     at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error     at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error Caused by: java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry;
| Error     at java.lang.Class.getDeclaredMethods0(Native Method)
| Error     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
| Error     at java.lang.Class.getDeclaredMethods(Class.java:1975)
| Error     at com.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:123)
| Error     at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
| Error     at java.security.AccessController.doPrivileged(Native Method)
| Error     at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
| Error     at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
| Error     at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
| Error     at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
| Error     at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
| Error     at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:341)
| Error     at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:291)
| Error     at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2908)
| Error     at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
| Error     at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
| Error     at groovy.util.ConfigObject.$getStaticMetaClass(ConfigObject.groovy)
| Error     at groovy.util.ConfigObject.<init>(ConfigObject.groovy)
| Error     at grails.util.AbstractBuildSettings.<init>(AbstractBuildSettings.java:33)
| Error     at grails.util.BuildSettings.<init>(BuildSettings.groovy)
| Error     at grails.util.BuildSettings.<init>(BuildSettings.groovy:729)
| Error     at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:162)
| Error     ... 7 more
| Error Caused by: java.lang.ClassNotFoundException: java.util.HashMap$Entry
| Error     at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
| Error     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| Error     at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
| Error     at org.codehaus.groovy.grails.cli.support.GrailsRootLoader.loadClass(GrailsRootLoader.java:43)
| Error     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| Error     ... 29 more

0 个答案:

没有答案