title: org.glassfish.jersey.servlet.ServletContainer ClassNotFoundException
body: <p>I have been getting a ClassNotFoundException with <code>org.glassfish.jersey.servlet.ServletContainer</code> but it peculiarly started last night when I tried to start/re-start my Tomcat server (v7) with Eclipse Juno. </p>
  
  <p>Not sure what is going on. What's bizarre is that it just started happening last night while it was working perfectly well before that.</p>
  
  <p>Here is the stacktrace:</p>
  
  <pre><code>Feb 25, 2014 11:11:19 AM org.apache.catalina.core.ApplicationContext log
  INFO: Marking servlet com.att.ucomm.admin.UCommAdminFunctions as unavailable
  Feb 25, 2014 11:11:19 AM org.apache.catalina.core.StandardContext loadOnStartup
  SEVERE: Servlet /UCommAdminFunctions threw load() exception
  java.lang.ClassNotFoundException: org.glassfish.jersey.servlet.ServletContainer
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1671)
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
  at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
  at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
  at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118    )
  at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
  at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:996)
  at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4762)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5045)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
  at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3670)
  at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:424)
  at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1207)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1393)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1403)
  at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1382)
  at java.lang.Thread.run(Unknown Source)
  
  Feb 25, 2014 11:11:19 AM org.apache.catalina.core.StandardContext reload
  INFO: Reloading Context with name [/UCommAdminFunctions] is completed
  Feb 25, 2014 11:13:33 AM org.apache.catalina.core.StandardWrapperValve invoke
  INFO: Servlet com.att.ucomm.admin.UCommAdminFunctions is currently unavailable
  </code></pre>
  
  <p>Here is my web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5"
      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_2_5.xsd"&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;com.att.ucomm.admin.UCommAdminFunctions&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
  
      &lt;!-- Register JAX-RS Application, if needed. --&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;com.att.ucomm.admin.UCommAdminFunctions&lt;/param-name&gt;
          &lt;param-value&gt;my.package.MyApplication&lt;/param-value&gt;
      &lt;/init-param&gt;
  
      &lt;!-- Register resources and providers under my.package. --&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;jersey.config.server.provider.packages&lt;/param-name&gt;
          &lt;param-value&gt;com.att.ucomm.admin&lt;/param-value&gt;
      &lt;/init-param&gt;
  
      &lt;!-- Register my custom provider (not needed if it's in my.package) AND LoggingFilter. --&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;jersey.config.server.provider.classnames&lt;/param-name&gt;
          &lt;param-value&gt;com.att.ucomm.admin.SecurityRequestFilter;org.glassfish.jersey.filter.LoggingFilter&lt;/param-value&gt;
      &lt;/init-param&gt;
  
      &lt;!-- Enable Tracing support. --&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;jersey.config.server.tracing&lt;/param-name&gt;
          &lt;param-value&gt;ALL&lt;/param-value&gt;
      &lt;/init-param&gt;
  
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;com.att.ucomm.admin.UCommAdminFunctions&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>I made sure that the jar files for jersey were still there in WEB-INF/lib:</p>
  
  <p><img src="https://i.stack.imgur.com/TgHjk.png" alt="WEB-INF/lib with jersey jars"></p>