When defining a classloader (custom or standard) inside the server.xml, configuration is not properly read and it fails. Example of server.xml: <Host> .. <Context path="petclinic" docBase="petclinic" reloadable="false"> <Loader loaderClass="org.apache.catalina.loader.WebappClassLoader"/> </Context> ... </Host> The webapp (petclinic in this case) will fail with the following error: SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) No matter what classloader is specified (a custom or an official one) the exception will appear. Removing the Loader tag, makes the application load properly.
The bug is similar to http://issues.apache.org/bugzilla/show_bug.cgi?id=39704
Although the error messages differ, this is in fact a duplicate. The problem is that the parent clasloader is not set so any classes that should be loaded from the shared classloader or higher fail. *** This bug has been marked as a duplicate of 39704 ***