Grails App not deploying on tomcat your server? Here’s the fix.

If you are trying to deploy a grails app on tomcat using a war and for some reason the war isn’t deploying then your app may be trying to create log files that it does not have permission to create or write too.

Just add the following to your grails-app/Config.groovy file and you should be good to go

def catalinaBase =‘catalina.base’)
if (!catalinaBase) catalinaBase = ’.’   // just in case
def logDirectory = “${catalinaBase}/logs”


= { root ->
        rollingFile name
:‘stdout’, file:“${logDirectory}/${appName}.log”.toString(),  maxFileSize:‘100MB’
        rollingFile name
:‘stacktrace’, file:“${logDirectory}/${appName}_stack.log”.toString(), maxFileSize:‘100MB’


‘org.codehaus.groovy.grails.web.servlet’,  //  controllers
‘org.codehaus.groovy.grails.web.pages’, //  GSP
‘org.codehaus.groovy.grails.web.sitemesh’, //  layouts
‘org.codehaus.groovy.grails.web.mapping.filter’, // URL mapping
‘org.codehaus.groovy.grails.web.mapping’, // URL mapping
‘org.codehaus.groovy.grails.commons’, // core / classloading
‘org.codehaus.groovy.grails.plugins’, // plugins
‘org.codehaus.groovy.grails.orm.hibernate’, // hibernate integration
.level = org.apache.log4j.Level.WARN

Special thanks to lazygun for his article on setting up rackspace cloud for grails.