7

不知何故,我的工作区已损坏。当我尝试在 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 控制台 (CTRL+Alt+G) 中使用 run-app 启动应用程序。我希望你能帮助我。

4

3 回答 3

12

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

于 2013-10-18T02:31:29.483 回答
8

我最近遇到了完全相同的错误(此时的最新版本:IDEA 14/grails 2.4.4)。在与它斗争了一会儿之后,我回忆起之前(IDEA)被问过一个关于类路径的问题,我只是盲目地回答“是”。试图找到这个设置让我想到了这个问题:dynamic.classpath 标志有什么作用?(IntelliJ 项目设置)

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

于 2015-02-23T15:48:53.963 回答
0

IntelliJ Idea 需要升级到最新版本

于 2014-07-01T22:29:04.260 回答