0
所以我試圖找到這個答案,但一切似乎不同於我有問題。我正在設置grails,以便可以更改現有的程序。問題是,當我嘗試運行程序時,我總是收到錯誤,我會得到NoClassDefFoundErrors和ClassNotFoundException。所以我認爲這個程序有問題,當我導入時可能會在文件路徑中出現混亂。然後我通過嘗試創建應用程序來測試我的Grails,並得到相同的錯誤。Grails設置問題
我使用Grails 2.2這是寫在原來的版本。
這是輸出我運行的Grails
| 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 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 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:340)
| Error at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:290)
| Error at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2924)
| Error at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:483)
| Error at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:176)
| Error at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:192)
| 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:789)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:164)
| Error ... 6 more
| Error Caused by: java.lang.ClassNotFoundException: java.util.HashMap$Entry
| Error at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| Error at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
| Error at org.codehaus.groovy.grails.cli.support.GrailsRootLoader.loadClass(GrailsRootLoader.java:48)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| Error ... 28 more
謝謝您的幫助