Failed to load custom context class
<p>Having a little trouble with my Spring configuration. It's working in a standalone Tomcat installation, but when I try to deploy to a Tomcat container within Eclipse for debugging purposes, I get the following error:</p>

<pre><code>2016-05-11 21:58:14,682 [localhost-startStop-1] INFO  web.context.ContextLoader (initWebApplicationContext): Root WebApplicationContext: initialization started
2016-05-11 21:58:14,687 [localhost-startStop-1] ERROR web.context.ContextLoader (initWebApplicationContext): Context initialization failed
org.springframework.context.ApplicationContextException: Failed to load custom context class [com.example.CustomWebAppContext]; nested exception is java.lang.ClassNotFoundException: com.example.CustomWebAppContext
    at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:469)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.example.CustomWebAppContext
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
    at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:466)
    ... 12 more
May 11, 2016 9:58:14 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.context.ApplicationContextException: Failed to load custom context class [com.example.CustomWebAppContext]; nested exception is java.lang.ClassNotFoundException: com.example.CustomWebAppContext
    at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:469)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:355)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5003)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.example.CustomWebAppContext
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1854)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1703)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:249)
    at org.springframework.web.context.ContextLoader.determineContextClass(ContextLoader.java:466)
    ... 12 more
</code></pre>

<p>web.xml</p>

<pre><code>&lt;context-param&gt;
  &lt;param-name&gt;contextClass&lt;/param-name&gt;
  &lt;param-value&gt;com.example.CustomWebAppContext&lt;/param-value&gt;
&lt;/context-param&gt;
</code></pre>

<p>I've checked the Java Build Path and Deployment Assembly of my project in Eclipse and it all looks good. Any help would be greatly appreciated.</p>