Posted by jkwarren on Sep 08 2011 in Blather
Two Days Spun With Tomcat Maven Conflict
Head-slapper here. I'm working on a small project to tinker with Servlet 3.0, which is part of the spec followed by the new Tomcat 7.0.
I've put together a tiny web app, and kept getting an annyong ClassCastException with some Catalina classes (Tomcat's inner name). After a little poking around I realized that both Maven and Eclipse were trying to provide the Tomcat classes to my project. Further, Maven was trying to include them in my project's WEB-INF/lib, which is woefully incorrect!
I removed Tomcat (more correctly, Jasper) from my Maven POM file, and the error went away, and my app behaved like I expected.