Tomcat: Application at context path /Project could not be Started

Asked

Viewed 1,917 times

1

I’m facing some problems with Tomcat 8.0.9 when I tried to get into /Projeto I received a HTTP STATUS 404, I went to look at the manager and was standing still, when I tried to start the /Projeto appears "Application at context path /Project could not be Started". A 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>

A couple of days ago it worked normally, the /Projeto started alone next to Tomcat, I don’t remember making any major changes. How can I solve this problem?

  • The cause of the problem is java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils. You need to configure the ClassPath, placing dependence on commons-lang. Be it in the WEB-INF/lib to apply only to your application or folder lib Tomcat to apply to all applications that are in this container.

  • She’s in the WEB-INF/lib. You have to declare something in web.xml?

  • You can check if it is in the same folder inside the war?

  • I downloaded the . zip from the Apache site, I was just extracting for the WEB-INF/lib right?

  • You need to put the jar inside that folder, but at the same time, inside the generated War that jar needs to be there too (your build should do this).

  • @Wakim, it worked, the . jar was inside a subfolder, moved to the WEB-INF/lib. Posed as an answer.

Show 1 more comment

1 answer

3


The cause of the problem is java.lang.ClassNotFoundException: org.apache.commons.lang3.StringEscapeUtils.

You need to set up Classpath by setting the dependency to Commons-lang apache.

In the case, the jar of Commons-lang needs to be placed either in the WEB-INF/lib to apply only to the Classpath of your application or the Tomcat lib folder to apply to the Classpath of all applications that are in that container.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.