0

I'm working with Tomcat 8.0.41 and I've run into a problem that I've been unable to solve. When I start Tomcat, I get the following exception message in the log, even with no web applications deployed.

28-Mar-2017 09:03:45.659 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Marking servlet Faces Servlet as unavailable
28-Mar-2017 09:03:45.659 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.loadOnStartup Servlet [Faces Servlet] in web application [] threw load() exception
 java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1027)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5038)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5348)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

All of the questions I've been able to find on StackOverflow say that the web application needs to include the correct dependency, but the weird thing is that the error still shows when I have zero web applications deployed. I don't remember this error being shown when I first started using tomcat, but I can't remember when it started. I would rather not add a jar to the tomcat/lib folder, as the web applications I use have the proper dependencies.

What could be causing this?

4
  • 1
    Wow, that's bizarre. Since you have no webapps deployed...maybe try stopping tomcat, clear out the "work" directory, and then restart tomcat. Commented Mar 28, 2017 at 18:03
  • 1
    Also, please take a gander at the "webapps" directory to see what's really trying to be deployed. I just realized that you might have been viewing things from tomcat manager instead of looking at the filesystem... Commented Mar 28, 2017 at 18:05
  • @BradBales thanks for the help. I cleared out work and restarted, but that didn't help. The webapps directory is completely empty. Commented Mar 28, 2017 at 18:47
  • 1
    @BradBales I figured out a solution (see the answer). Thanks for your help! It pointed me in the right direction! Commented Mar 28, 2017 at 19:02

1 Answer 1

1

I found the source of the problem, though I'm not sure why it was causing it. The file at {CATALINA BASE}\conf\Catalina\localhost\ROOT.xml had been changed to:

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="SOME LONG INVALID FILE PATH" path=""/>

The 'SOME LONG INVALID FILE PATH' was a directory of JEE tutorials that I had removed earlier in the week. I edited the ROOT.xml file to

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="" path=""/>

And now Tomcat starts without complaint. Any explanation as to why this was causing the above problem is welcome.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.