Summary:

Copying and renaming a webapp may result in a failure to start the Sage CRM webapps. If a webapp is to be backed up (prior to amending settings, for example), the backup should not be stored in the ..\CRM\tomcat\webapps directory.

Symptoms:

The Tomcat catalina.log may indicate that the Tomcat web server is attempting to deploy an unfamiliar webapp:

INFO: Deploying web application directory C:\Program Files (x86)\Sage\CRM\CRM\tomcat\webapps\crmjOLD
SEVERE: Error listenerStart

The ..\CRM\tomcat\logs\localhost.log shows the following:

SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
java.lang.IllegalStateException: Web app root system property already set to different value: 'crmj' = [C:\Program Files (x86)\Sage\CRM\CRM\tomcat\webapps\crmj\] instead of [C:\Program Files (x86)\Sage\CRM\CRM\tomcat\webapps\crmjOLD\] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
 at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:148)
 at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:117)
 at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1099)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1621)
 at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)

 

Cause:

This is expected behaviour - Tomcat will attempt to deploy and execute any webapp found in the ..\CRM\tomcat\webapps directory. the duplicate webapp will cause an error when it loads. Copies of the webapp directories or WAR files should not be stored in this directory.

Resolution:

Removing the backup webapp resolves the issue.