Friday, July 26, 2013

Spring Security Error: java.lang.ClassCastException: org.springframework.web.filter.DelegatingFilterProxy cannot be cast to javax.servlet.Filter

As trying play around with Spring Security, I run into this weird error.
java.lang.ClassCastException: org.springframework.web.filter.DelegatingFilterProxy cannot be cast to javax.servlet.Filter
After doing some Google research, I found a solution for my problem quite simple: just add the scope for java-servlet-api dependency. 




Note: This error occurs when running maven tomcat (mvn tomcat:run)


1 comment: