我在tomcat服务器日志中收到错误可以有人帮忙。请告诉我需要采取什么行动。
2016-01-21 01:46:37,370 INFO - ApplicationManager.LoadApplicationFactory:
com.gft.rpdb.service.webflow.WebflowAppFactoryImpl
2016-01-21 01:46:42,958 INFO - RpdbImportProvider Init on Port ... 1099
2016-01-21 01:46:43,178 INFO - RpdbImportProvider Ready.
2016-01-21 01:46:43,211 INFO - ControllerFilterServlet.Init: Proxy for batch services disabled.','false
2016-01-21 01:46:43,212 INFO - ControllerFilterServlet.Init: InitFinished ,'Framework started'
2016-01-21 01:46:55,259 ERROR - Parse Error at line 164 column 11: The
content of element type "web-app" must match
"(icon?,display-name?,description?,distributable?,
context- param*,filter*,filter-mapping*,listener*,servlet*,
servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,
error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,
login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
org.xml.sax.SAXParseException: The content of element type "web-app" must match
....
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
....
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
....
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<filter>
<filter-name>ControllerFilter</filter-name>
<display-name>ControllerFilterServlet</display-name>
<description>This the MVC Controller for the site.</description>
<filter-class>com.gft.rpdb.web.ControllerFilterServlet</filter-class>
<init-param>
<param-name>configFile</param-name>
<param-value>WEB-INF/fwk/framework-config.xml</param-value>
</init-param>
<init-param>
<param-name>urlBase</param-name>
<param-value>http://repackp1.uk.db.com:9670/rpdb/</param-value>
</init-param>
<init-param>
<param-name>proxy-enabled</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>proxy-host-address</param-name>
<param-value>_PROXY_HOST_ADDRESS_</param-value>
</init-param>
<init-param>
<param-name>proxy-host-port</param-name>
<param-value>_PROXY_HOST_PORT_</param-value>
</init-param>
</filter>
<filter>
<filter-name>UploadFilter</filter-name>
<display-name>UploadFilterServlet</display-name>
<description>FilterServlet responsible of performing file uploads.</description>
<filter-class>com.gft.rpdb.web.UploadFilterServlet</filter-class>
<init-param>
<param-name>maxRequestSize</param-name>
<param-value>10000000</param-value>
</init-param>
<init-param>
<param-name>tempDirectory</param-name>
<param-value>WEB-INF/fwk/tmp</param-value>
</init-param>
<init-param>
<param-name>maxMemorySize</param-name>
<param-value>0</param-value>
</init-param>
</filter>
<filter>
<filter-name>WebServiceFilter</filter-name>
<display-name>WebServiceFilter</display-name>
<description>FilterServlet responsible of Webservices.</description>
<filter-class>com.gft.rpdb.web.WebServiceFilterServlet</filter-class>
<init-param>
<param-name>dirFile</param-name>
<param-value>WEB-INF/fwk/config/webservice/</param-value>
</init-param>
<init-param>
<param-name>propertiesFile</param-name>
<param-value>webservices.properties</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UploadFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>ControllerFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>WebServiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
servlet> <servlet-name>restcommander</servlet-name>
<servlet-class>com.gft.rpdb.app.batch.RestCommander</servlet-class>
</servlet> <servlet-mapping>
<servlet-name>restcommander</servlet-name>
<url-pattern>/restcommander</url-pattern> </servlet-mapping
-->
<session-config>
<session-timeout>15</session-timeout>
</session-config>
<servlet>
<servlet-name>AxisServlet</servlet-name>
<display-name>Apache-Axis Servlet</display-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
<init-param>
<param-name>axis2.xml.path</param-name>
<param-value>/apps/repack/rpdb-conf/axis2.xml</param-value>
</init-param>
<!-- init-param>
<param-name>axis2.repository.path</param-name>
<param-value>WEB-INF/repository</param-value>
</init-param-->
<!--<param-name>axis2.repository.url</param-name>-->
<!--<param-value>http://localhot/myrepo</param-value>-->
<!--<param-name>axis2.xml.url</param-name>-->
<!--<param-value>http://localhot/myrepo/axis2.xml</param-value>-->
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>welcome.html</welcome-file>
</welcome-file-list>
<!-- Security Constraints -->
<security-constraint>
<display-name>Tomcat Server Configuration Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.html</url-pattern>
<url-pattern>*.do</url-pattern>
<url-pattern>*.*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>REPACK_Sales_User_Group</role-name>
<role-name>REPACK_London_Trade_Support</role-name>
<role-name>REPACK_BAC</role-name>
<role-name>REPACK_Superusers</role-name>
<role-name>REPACK_New_York_Trade_Support</role-name>
<role-name>REPACK_Tokyo_Trade_Support</role-name>
<role-name>REPACK_Singapore_Trade_Support</role-name>
<role-name>REPACK_Sydney_Trade_Support</role-name>
<role-name>REPACK_London_Middle_Office</role-name>
<role-name>REPACK_New_York_Middle_Office</role-name>
<role-name>REPACK_Tokyo_Middle_Office</role-name>
<role-name>REPACK_Singapore_Middle_Office</role-name>
<role-name>REPACK_Sydney_Middle_Office</role-name>
<role-name>REPACK_London_Traders</role-name>
<role-name>REPACK_New_York_Traders</role-name>
<role-name>REPACK_Tokyo_Traders</role-name>
<role-name>REPACK_Singapore_Traders</role-name>
<role-name>REPACK_Sydney_Traders</role-name>
<role-name>REPACK_London_Business_Manager</role-name>
<role-name>REPACK_Legal_Support</role-name>
<role-name>REPACK_Legal</role-name>
<role-name>REPACK_Credit</role-name>
<role-name>REPACK_Trade_Support_Manager</role-name>
<role-name>REPACK_GBS</role-name>
<role-name>REPACK_Bangalore_Support</role-name>
</auth-constraint>
</security-constraint>
<!--Change from a pop up dialog box to an input form-->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Repackaging Database - Authentication</realm-name>
<form-login-config>
<form-login-page>/logon.do</form-login-page>
<form-error-page>/logon.do?failed=true</form-error-page>
</form-login-config>
</login-config>
<security-role><role-name>REPACK_Sales_User_Group</role-name>
</security-role>
<security-role><role-name>REPACK_London_Trade_Support</role-name>
</security-role>
<security-role><role-name>REPACK_Superusers</role-name>
</security-role>
<security-role><role-name>REPACK_BAC</role-name>
</security-role>
<security-role><role-name>REPACK_Credit</role-name>
</security-role>
<security-role><role-name>REPACK_New_York_Trade_Support</role-name>
</security-role>
<security-role><role-name>REPACK_Tokyo_Trade_Support</role-name>
</security-role>
<security-role><role-name>REPACK_Singapore_Trade_Support</role-name>
</security-role>
<security-role><role-name>REPACK_Sydney_Trade_Support</role-name>
</security-role>
<security-role><role-name>REPACK_London_Middle_Office</role-name>
</security-role>
<security-role><role-name>REPACK_New_York_Middle_Office</role-name>
</security-role>
<security-role><role-name>REPACK_Tokyo_Middle_Office</role-name>
</security-role>
<security-role><role-name>REPACK_Singapore_Middle_Office</role-name>
</security-role>
<security-role><role-name>REPACK_Sydney_Middle_Office</role-name>
</security-role>
<security-role><role-name>REPACK_London_Traders</role-name>
</security-role>
<security-role><role-name>REPACK_New_York_Traders</role-name>
</security-role>
<security-role><role-name>REPACK_Tokyo_Traders</role-name>
</security-role>
<security-role><role-name>REPACK_Singapore_Traders</role-name>
</security-role>
<security-role><role-name>REPACK_Sydney_Traders</role-name>
</security-role>
<security-role><role-name>REPACK_London_Business_Manager</role-name>
</security-role>
<security-role><role-name>REPACK_Legal_Support</role-name>
</security-role>
<security-role><role-name>REPACK_Legal</role-name>
</security-role>
<security-role><role-name>REPACK_Trade_Support_Manager</role-name>
</security-role>
<security-role><role-name>REPACK_GBS</role-name>
</security-role>
<security-role><role-name>REPACK_Bangalore_Support</role-name>
</security-role>
</web-app>
答案 0 :(得分:0)
您的web.xml中的元素顺序错误。该错误消息提供了web.xml内容必须匹配的确切顺序。
如果你检查它,至少<servlet*>
元素位于错误的位置(它位于{{1}}元素之前,需要在之后)。错误的位置可能会有更多标签 - 如果您继续遇到问题,请自行验证。