我正在尝试在Tomcat 9.0.7应用服务器中部署使用JSF 2.2和Spring 5开发的Web应用程序但是我收到了一个非常罕见的错误
12-Jun-2018 17:21:23.033 GRAVE [http-nio-8181-exec-3] org.apache.catalina.core.ApplicationContext.log FALLO - No se pudo arrancar la aplicación en trayectoria de contexto [/web-project]
org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ web-project]] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) 在org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1395) 在org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:698) 在org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:660) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:741) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) 在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) 在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) 在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:611) 在org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348) 在org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52) 在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) 在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651) 在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) 在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) 在org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407) 在org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) 在org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:754) 在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1376) 在org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) 在java.lang.Thread.run(Thread.java:748) 引起:java.lang.IllegalArgumentException:Laocalizacióndelapáginadeerror 0} debe de comenzar con'/' at org.apache.catalina.core.StandardContext.addErrorPage(StandardContext.java:2859) at org.apache.catalina.startup.ContextConfig.configureContext(ContextConfig.java:1264) 在org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1187) 在org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:765) 在org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299) 在org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) 在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4964) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ......还有32个
的web.xml
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
version="3.1">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>0</param-value>
</context-param>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException
</exception-type>
<location>index.xhtml</location>
</error-page>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- esto hizo que las peticiones no pasaran por Spring, de lo contrario
tenía que implementar un controlador de spring -->
<listener>
<listener-class>com.sun.faces.config.ConfigureListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
<session-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<error-page>
<location>/error.xhtml</location>
</error-page>
</web-app>
faces-config.xml中
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
version="2.2">
<lifecycle>
<phase-listener>
com.jsfspringintegration.controller.DepuracionListener
</phase-listener>
</lifecycle>
<application>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<!--No se necesita agregar la extension del archivo, para configurar los
mensajes -->
<resource-bundle>
<base-name>mensajes</base-name>
<var>msgs</var>
</resource-bundle>
<!--cambio de textos de validadores -->
<message-bundle>errorMessages</message-bundle>
</application>
<factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory>
</faces-config>
在STS IDE中,每件事情都很好但是当我尝试部署它时,Tomcat会向我显示此错误 任何帮助,PLease !!!!!