工作区损坏的grails 2.2.4,Intellij Idea 12.1.4,Windows 7

时间:2013-09-30 12:56:48

标签: grails intellij-idea

不知何故,我的工作区已损坏。当我尝试在intellij IDEA中运行我的应用程序时,我收到以下错误:

"C:\Program Files\Java\jdk1.7.0_40\bin\java" -Dgrails.home=C:\catalysts\sdks\grails\grails-2.2.4\grails-2.2.4 -Dbase.dir=C:\catalysts\src\mediacenter\mm-web "-Dtools.jar=C:\Program Files\Java\jdk1.7.0_40\lib\tools.jar" -Dgroovy.starter.conf=C:\catalysts\sdks\grails\grails-2.2.4\grails-2.2.4/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -javaagent:C:\catalysts\sdks\grails\grails-2.2.4\grails-2.2.4\lib\org.springsource.springloaded\springloaded-core\jars\springloaded-core-1.1.3.jar -noverify -Dspringloaded=profile=grails -Didea.launcher.port=7535 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\bin" -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\lib\util.jar" -Dfile.encoding=UTF-8 com.intellij.rt.execution.CommandLineWrapper C:\Users\Catalysts\AppData\Local\Temp\classpath4359768120270928639.tmp com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\catalysts\sdks\grails\grails-2.2.4\grails-2.2.4/conf/groovy-starter.conf run-app
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121)
Caused by: java.lang.NoClassDefFoundError: org/springsource/loaded/ri/ReflectiveInterceptor
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: org.springsource.loaded.ri.ReflectiveInterceptor
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

Process finished with exit code 1

测试用例工作正常,我也可以在intellij控制台中使用run-app启动应用程序(CTRL + Alt + G)。 我希望你能帮助我。

3 个答案:

答案 0 :(得分:12)

删除文件夹~/.grails/.slcache

答案 1 :(得分:8)

我最近得到了完全相同的错误(此时的最新版本:IDEA 14 / grails 2.4.4)。在与它进行了一段时间的战斗之后,我回想起之前(由IDEA)提出的关于类路径的问题,我只是盲目地回答是。试图找到这个设置让我想到了这个问题:What does the dynamic.classpath flag do? (IntelliJ project settings)

编辑我的.iws文件并将动态类路径设置为false后,'ClassNotFoundException:org.springsource.loaded.ri.ReflectiveInterceptor'消失了。

答案 2 :(得分:0)

IntelliJ Idea需要升级到最新版本