I work on a 4 person development team using IntelliJ, but for some reason only one the team members can successfully build a WAR file and deploy. All other members will receive the following error:
Aug 17, 2012 2:14:31 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Aug 17, 2012 2:14:31 PM org.apache.catalina.core.StandardContext startSEVERE: Context [/xxx] startup failed due to previous errors
2012-08-17 14:14:40,171 [http-8080-1] ERROR context.ContextLoader – Context initialization failed
java.lang.NoSuchMethodError: org.springframework.web.context.support.XmlWebApplicationContext.getEnvironment()Lorg/springframework/core/env/ConfigurableEnvironm
ent;
From everything I’ve researched, this is caused by a version conflict in the Spring Framework, but for the life of me I can’t seem to resolve the issue.
Has anyone ever run into this issue? And how can I resolve it?
Modify your catalina.sh/catalina.bat such that you launch java using the
-verbose:classflag. It will produce a lot of output, but you should be able to see which JAR file you’re loadingorg.springframework.web.context.support.XmlWebApplicationContextfrom and chances are it’s not the same version that your version of Grails is using. Remove the bad version from your classpath and hopefully you’ll be good to go.