Running grails apps with searchable plugin on a Debian/Ubuntu tomcat

Today, when throwing a new application of mine into the default tomcat conatiner that comes with the Ubuntu Hardy runningon my notebook, I got some strange errors:

2009-03-31 12:32:51,202 [main] ERROR StackTrace - Sanitizing stacktrace: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is org.compass.core.engine.SearchEngineException: Failed to open directory for path [tag]; nested exception is Cannot create directory: /usr/share/tomcat5.5/.grails/projects/SimpleContacts/searchable-index/production/index/tag at$ at Method)

And so on. I did not find the solution in the Searchable plugin docs (though, I could have found it - I somehow oversaw it - or didn't search enough) ) - but the nice grails list helped me to see, I had to change the entry for compassConnection

It then looked like:

compassConnection = new File( "/tmp/grails/projects/${appName}/searchable-index/${grailsEnv}" ).absolutePath

And I did apply it only for the production environment. For advanced production use, I'd create a place in /var/lib/appName for this and make it writable by the tomcat user. When running on the same tomcat with other apps from different parties, you'd have to set mor efine grained acces control in tomcat's security settings to avoid people reading and manipulating each other's data.