Issue related to `webAppRootKey` while deploying spring application in JBoss EAP 7/6

Solution Verified - Updated -

Issue

  • We are getting exception like below.
14:19:45,696 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/WarName]] (ServerService Thread Pool -- 213) JBWEB000287: 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: 'webapp.root' = [/Path/ToJBoss/EAP6/standalone/tmp/vfs/temp/temp......../content-da..../] instead of [/Path/ToJBoss/EAP6/standalone/tmp/vfs/temp/temp...../content-b.../] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:150) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
    at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:116) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
    at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:45) [spring-web-3.2.6.RELEASE.jar:3.2.6.RELEASE]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.3.2.Final-redhat-3-bz1113339.jar:7.3.2.Final-redhat-3]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.3.2.Final-redhat-3-bz1113339.jar:7.3.2.Final-redhat-3]
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:156) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93) [jboss-as-web-7.3.4.Final-redhat-1.jar:7.3.4.Final-redhat-1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_45]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

14:20:09,183 ERROR [org.apache.catalina.core] (ServerService Thread Pool -- 213) JBWEB001103: Error detected during context /WarName start, will stop it
14:20:09,397 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 213) MSC000001: Failed to start service jboss.web.deployment.default-host./WarName: org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./WarName: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_45]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: org.jboss.msc.service.StartException in anonymous service: JBAS018040: Failed to start context
    at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161)
    at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:60)
    at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:93)
    ... 7 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content