Or java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
for that matter. NoClassDefFoundError on HttpSessionListener , ServletListener , ServletContextListener, etc. can be caused by a custom classloader like Sysdeo DevLoader (I use it with Eclipse) in you Context definition in the Tomcat’s server.xml file.
<Loader classname="org.apache.catalina.loader.DevLoader"
reloadable="true" debug="1" />
the solution: add
useSystemClassLoaderAsParent="false"
to the Loader
<Loader classname="org.apache.catalina.loader.DevLoader"
reloadable="true"
debug="1" useSystemClassLoaderAsParent="false"/>