2

Estou enfrentando alguns problemas com o tomcat 8.0.9, quando tentei entrar no /Projeto recebi um HTTP STATUS 404, fui olhar no manager e estava parado, quando tento iniciar o /Projeto aparece "Application at context path /Projeto could not be started". Um log:

localhost.2014-07-26.log

26-Jul-2014 00:04:28.925 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4758)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1722)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:642)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:325)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
    ... 13 more
Caused by: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:384)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:638)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.faces.util.Util.loadClass(Util.java:325)
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:376)
    ... 18 more

26-Jul-2014 00:06:24.146 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
26-Jul-2014 00:06:24.146 INFO [localhost-startStop-3] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
26-Jul-2014 00:06:56.437 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
26-Jul-2014 00:06:56.437 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
26-Jul-2014 00:07:31.750 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4758)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1071)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1722)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:642)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:325)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
    ... 13 more
Caused by: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:384)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:638)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.faces.util.Util.loadClass(Util.java:325)
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:376)
    ... 18 more

26-Jul-2014 12:28:07.494 SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4758)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1270)
    at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:673)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:221)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:642)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:325)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
    ... 36 more
Caused by: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:384)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:638)
    ... 40 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.faces.util.Util.loadClass(Util.java:325)
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:376)
    ... 41 more

26-Jul-2014 12:29:06.965 SEVERE [http-nio-8080-exec-5] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
 java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4758)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1270)
    at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:673)
    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:221)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:615)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
    at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.sun.faces.config.ConfigurationException: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:642)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:325)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:270)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:437)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
    ... 36 more
Caused by: javax.faces.FacesException: org.apache.commons.lang3.StringEscapeUtils
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:384)
    at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processFunctions(FaceletTaglibConfigProcessor.java:638)
    ... 40 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.faces.util.Util.loadClass(Util.java:325)
    at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:376)
    ... 41 more

web.xml

<?xml version="1.0" encoding="utf-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>sam</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
</web-app>

Há uns dois dias funcionava normalmente, o /Projeto iniciava sozinho junto ao tomcat, não me lembro de ter feito nenhuma modificação maior. Como posso resolver este problema?

6
  • A causa do problema é java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils. Você precisa configurar o ClassPath, colocando a dependência ao commons-lang. Seja no WEB-INF/lib para aplicar apenas à sua aplicação ou a pasta lib do Tomcat para aplicar a todas as aplicações que estão nesse container.
    – Wakim
    Commented 26/07/2014 às 16:34
  • Ela está no WEB-INF/lib. Tem que declarar algo no web.xml?
    – ptkato
    Commented 26/07/2014 às 16:37
  • Pode verificar se ela se encontra na mesma pasta dentro do war?
    – Wakim
    Commented 26/07/2014 às 16:39
  • Eu baixei o .zip do site do Apache, era só extrair para o WEB-INF/lib né?
    – ptkato
    Commented 26/07/2014 às 16:56
  • Precisa colocar o jar dentro dessa pasta, mas ao mesmo tempo, dentro do war gerado esse jar precisa estar lá também (seu build deve fazer isso).
    – Wakim
    Commented 26/07/2014 às 16:57

1 Resposta 1

4

A causa do problema é java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils.

Você precisa configurar o Classpath, colocando a dependência ao commons-lang da Apache.

No caso, o jar do commons-lang precisa ser colocado, seja no WEB-INF/lib para aplicar apenas ao Classpath da sua aplicação ou a pasta lib do Tomcat para aplicar ao Classpath de todas as aplicações que estão nesse container.

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .