shaydel
shaydel

Reputation: 589

Cannot `run-app` from intellij

Cannot run-app from intellij 14, I am using grails 2.5.0 run-app outside intellij works!!

Error

"C:\Program Files\Java\jdk1.8.0_45\bin\java" -Dgrails.home=C:\opt\grails-2.5.3 -Dbase.dir=C:\Projects\SIM "-Dtools.jar=C:\Program Files\Java\jdk1.8.0_45\lib\tools.jar" -Dgroovy.starter.conf=C:\opt\grails-2.5.3/conf/groovy-starter.conf -Djline.WindowsTerminal.directConsole=false -javaagent:C:\opt\grails-2.5.3\lib\org.springframework\springloaded\jars\springloaded-1.2.4.RELEASE.jar -noverify -Dspringloaded=profile=grails;cacheDir=. -Dgrails.project.fork.run.debugArgs=-Xrunjdwp:transport=dt_socket,server=n,suspend=n,address=1326 -Dgrails.project.fork.test.debugArgs=-Xrunjdwp:transport=dt_socket,server=n,suspend=n,address=1326 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.4\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 15.0.4\lib\util.jar" -Dfile.encoding=UTF-8 com.intellij.rt.execution.CommandLineWrapper C:\Users\shay\AppData\Local\Temp\classpath0.tmp org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\opt\grails-2.5.3/conf/groovy-starter.conf "run-app -plain-output"
java.lang.NoClassDefFoundError: org/springsource/loaded/ri/ReflectiveInterceptor
Error starting Grails: org/springsource/loaded/ri/ReflectiveInterceptor
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:224)
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1426)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:46)
Caused by: java.lang.ClassNotFoundException: org.springsource.loaded.ri.ReflectiveInterceptor
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 8 more

Process finished with exit code 1

Upvotes: 2

Views: 2491

Answers (3)

Adam
Adam

Reputation: 615

I have the same problem, I just click event log (in the button right angle) and click Configure Grails SDK select grails SDK and it start work.

enter image description here

Upvotes: 0

Vadim
Vadim

Reputation: 1131

In my case I could not change grails version due to project requirements. When changed version from latest to jdk1.8.0_65 all became normal. So have a look if you did upgrade java or having latest one (8.0_111 in my case).

Upvotes: 0

shaydel
shaydel

Reputation: 589

Re-importing the project and changing to grails 2.5.3 fixed it.

Upvotes: 2

Related Questions