ClassNotFoundException: GrailsIdeaTestListener when trying to run Grails tests

Hi All,

I'm using IDEA 10 (idea-IU-98.382) and am trying to run some Grails tests.

When I try to create a run configuration for test-app (see screenshot)

Screenshot-Run-Debug Configurations.png

I get the exception:

/development/tools/jdk/bin/java -Dgrails.home=/development/tools/grails -Dbase.dir=/development/ceswp/CESWP/trunk/ceswp -Dtools.jar=/development/tools/jdk/lib/tools.jar -Dgroovy.starter.conf=/development/tools/grails/conf/groovy-starter.conf -Xmx512M -Dgrails.build.listeners=org.jetbrains.groovy.grails.tests.GrailsIdeaTestListener -Didea.launcher.port=7536 -Didea.launcher.bin.path=/development/tools/idea-IU-98.382/bin -Dfile.encoding=UTF-8 -classpath /development/tools/grails/lib/groovy-all-1.7.5.jar:/development/tools/grails/dist/grails-bootstrap-1.3.5.jar:/development/tools/idea-IU-98.382/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf /development/tools/grails/conf/groovy-starter.conf test-app --classpath /development/tools/idea-IU-98.382/plugins/GrailsGriffon/lib/groovy_mvc_rt.jar
Testing started at 11:50 AM ...
Welcome to Grails 1.3.5 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /development/tools/grails
Base Directory: /development/ceswp/CESWP/trunk/ceswp
Resolving dependencies...
Dependencies resolved in 877ms.
Running script /development/tools/grails/scripts/TestApp.groovy
Environment set to test
Error executing script TestApp: Could not load grails build listener class
java.lang.RuntimeException: Could not load grails build listener class
    at _GrailsEvents_groovy.run(_GrailsEvents_groovy:54)
    at _GrailsEvents_groovy$run.call(Unknown Source)
    at _GrailsClean_groovy$run.call(Unknown Source)
    at _GrailsClean_groovy.run(_GrailsClean_groovy:29)
    at _GrailsClean_groovy$run.call(Unknown Source)
    at TestApp.run(TestApp.groovy:43)
    at TestApp$run.call(Unknown Source)
    at gant.Gant.prepareTargets(Gant.groovy:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
Caused by: java.lang.ClassNotFoundException: org.jetbrains.groovy.grails.tests.GrailsIdeaTestListener
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    ... 9 more
Error executing script TestApp: Could not load grails build listener class
Empty test suite.

Process finished with exit code 1

Am I missing something or is this a genuine bug?

Note that grails test-app works fine from the command line.

Everett

1 comment
Comment actions Permalink

Hi,

It is issue http://youtrack.jetbrains.net/issue/IDEA-61453.
Excuse that we haven't answered you in time.

Sergey.

0

Please sign in to leave a comment.