java Tomcat 7.0.12 上“Error deploying configuration descriptor”的原因
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5887501/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cause of "Error deploying configuration descriptor" on Tomcat 7.0.12
提问by Dmitrii Pisarenko
When I try to deploy a WAR file by dropping it into webapps directory, I get following message in the console:
当我尝试通过将 WAR 文件放入 webapps 目录来部署它时,我在控制台中收到以下消息:
04.05.2011 19:34:07 org.apache.catalina.startup.HostConfig deployWAR
SEVERE: Error deploying configuration descriptor xyz.war
I didn't find any hints about the detailed cause of this in the logs.
我没有在日志中找到任何有关此问题的详细原因的提示。
Where can I find out the details (e. g. the stack trace) about this failure?
我在哪里可以找到有关此故障的详细信息(例如堆栈跟踪)?
Here's the web.xml:
这是 web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>myapp</display-name>
<context-param>
<description>
Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet>
<servlet-name>Project Control Center Application</servlet-name>
<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<description>
Vaadin application class to start</description>
<param-name>application</param-name>
<param-value>at.mycompany.myapp.ProjectControlCenterApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Project Control Center Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>at.mycompany.myapp.impl.persistence.DatabaseStartStopServletContextListener</listener-class>
</listener>
<session-config>
<session-timeout>480</session-timeout>
</session-config>
</web-app>
回答by Dmitrii Pisarenko
I found the answer. The cause of the problem was a malformed context.xml file.
我找到了答案。问题的原因是格式错误的 context.xml 文件。
回答by Bharath Asl
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" ...>
<welcome-file-list>
<welcome-file>
...
</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>info</servlet-name>
<servlet-class>servlets.info.Properties</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Properties</servlet-name>
<!-- Here I forget to change the servlet name to info -->
<!-- So, the reason is invalid web.xml file -->
<url-pattern>/Properties</url-pattern>
</servlet-mapping>
</web-app>
Double-check your web.xml file.
仔细检查您的 web.xml 文件。