Debug:tomcat:Web app root system property already set to different value:

来源:互联网 发布:如何成为淘宝达人步骤 编辑:程序博客网 时间:2024/06/09 14:56

异常原因:tomcat启动了两个相似的项目。

解决方法1:删除一个,只部署一个

解决方法2:web.xml中加入--------------------------

<context-param>
  <param-name>webAppRootKey</param-name>
  <param-value>项目名称</param-value>
</context-param>

java.lang.IllegalStateException: Web app root system property already set to different value: 'webapp.root' = [E:\DevelopProject\pdata\WebRoot\] instead of [D:\DevelopWare\apache-tomcat-7.0.33\webapps\pdata\] - Choose unique values for the 'webAppRootKey' context-param in your web.xml files!
 at org.springframework.web.util.WebUtils.setWebAppRootSystemProperty(WebUtils.java:146)
 at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:118)
 at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:47)
 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114)
 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:619)