title: 404 Error - The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
body: <p>Really need help!
  I am trying to deploy my application on to Tomcat. I tried almost every solution on stackoverflow but no luck.</p>
  
  <pre><code>Maven clean install [Success]
  Run on server - 404 error
  INFO: No Spring WebApplicationInitializer types detected on classpath
  Jul 18, 2018 8:12:22 PM org.apache.catalina.core.StandardContext 
  listenerStart
  SEVERE: Error configuring application listener of class 
  org.springframework.security.web.session.HttpSessionEventPublisher
  java.lang.ClassNotFoundException: org.springframework.security.web.session.HttpSessionEventPublisher
  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1352)
  at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180)
  at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)
  at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:525)
  at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4822)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5363)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)
  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)
  </code></pre>
  
  <p>Dependencies corresponding to Springframework security</p>
  
  <pre><code> &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-config&lt;/artifactId&gt;
              &lt;version&gt;5.0.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
              &lt;version&gt;5.0.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-openid&lt;/artifactId&gt;
              &lt;version&gt;5.0.1.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>[EDIT]
  Tried adding scope as compile but I didn't see any change in the log.
  Solutions tried:
  Added Maven dependencies to Deployment Assembly
  Tried with both Tomcat 8 and Tomcat 8.5
  Tried adding spring-security-web to pom.xml yet not working</p>