1
votes

I have created a grails project using the maven integration instructions from the user's guide. The project builds successfully with 'mvn install' and can be run successfully with 'mvn grails:run-app'. However, the project can not be run with 'mvn grails:run-war'.

At first, the command 'mvn grails:run-war' appears to function correctly as the command runs successfully and ends with the familiar 'Server running. Browse to '. However, when you hit the project URL in a browser you get a 404 error and the following output in the tomcat-err.txt. The same behavior is displayed if an attempt is made to deploy the war file generated from 'mvn install' into tomcat.

Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardService start INFO: Starting service Tomcat Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0-snapshot Mar 22, 2011 9:03:41 AM org.apache.catalina.startup.ContextConfig defaultWebConfig INFO: No default web.xml Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.codehaus.groovy.grails.web.util.Log4jConfigListener java.lang.ClassNotFoundException: org.codehaus.groovy.grails.web.util.Log4jConfigListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3904) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4456) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:515) at org.apache.catalina.core.StandardServer.start(StandardServer.java:708) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:286) at org.grails.tomcat.IsolatedTomcat.main(IsolatedTomcat.java:101) Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener java.lang.ClassNotFoundException: org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3904) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4456) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:515) at org.apache.catalina.core.StandardServer.start(StandardServer.java:708) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:286) at org.grails.tomcat.IsolatedTomcat.main(IsolatedTomcat.java:101) Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Mar 22, 2011 9:03:41 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/fist-gauntlet] startup failed due to previous errors Mar 22, 2011 9:03:41 AM org.apache.coyote.http11.Http11Protocol start

Is there a dependency problem in the way mvn builds a grails war file?

Thanks,

Nathan

1

1 Answers

1
votes

Upgrading from grails 1.3.6 to grails 1.3.7 resolved the problem