2
votes

I have a Grails application that builds and run fine in development, however when I create a war file (grails dev create war /target.helloworld.war) for example, that .war does not deploy properly.

Through process of elimination I have narrowed the problem down to the spring-security-ldap plugin.

I have tested this in three environments:

Tomcat 7 MacOSx JDK7 Tomcat 6 Ubuntu 12.04 JDK7 Tomcat 7 Ubuntu 12.04 JDK7

I am compiling with the same JDK version in all environments.

The error I get:

INFO: Deploying web application archive helloworld.war Nov 11, 2012 12:54:15 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Nov 11, 2012 12:54:15 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/helloworld] startup failed due to previous errors Nov 11, 2012 12:54:15 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/helloworld] appears to have started a thread named [MongoCleaner1671814044] but has failed to stop it. This is very likely to create a memory leak.

I have also followed the instruction for adding FINE logging to the classes folder, however that does not seem to help me here either.

For reference I have followed this thread: http://grails.1312388.n4.nabble.com/Deployment-problems-td4628710.html

Has anyone experience this and solved it with spring-security-ldap 1.0.6?

Thanks in advance?

1

1 Answers

7
votes

Put a file named logging.properties in the WEB-INF/classes (unwar your app) folder and put this inside it:

handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = /var/log
org.apache.juli.FileHandler.prefix = myapp-tomcat.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

Then restart Tomcat.

Your app will still fail but inside the file /var/log/myapp-tomcat.log you will find a more detailed error trace than an useless "SEVERE: Error listenerStart"

There is probably a missing class file or a database configuration error.