Reputation: 301
I have the Grails project that is managed and compiled by Maven. I'm trying to run application with IntelliJ IDEA 10.5.4. The project is imported into IDEA as Maven project.
When I try ro run or debug application I get an error:
Fatal error forking Grails JVM: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
<...>
Caused by: java.lang.reflect.InvocationTargetException
<...>
Caused by: java.lang.NoClassDefFoundError: org/apache/catalina/startup/Tomcat
<...>
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.startup.Tomcat
<...>
I've already installed Tomcat 6 server into IDEA's settings, but I think this is not IDEA's problem but the Maven's one, because running mvn grails:run-app
in console gives the same result. There is dependency build ":tomcat:$grailsVersion"
in the file BuildConfig.groovy
too if it's important.
What is wrong?
Upvotes: 1
Views: 1761
Reputation: 3560
See this blog post for more information. The short version is to move the tomcat plugin out of BuildConfig
and into your pom.xml
Also, make sure you have the line use pom
inside your grails.project.dependency.resolution
closure inside BuildConfig
.
Upvotes: 2