You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kurtis Kopf <zo...@gmail.com> on 2010/06/28 17:53:18 UTC

Unable to cast as Filter exception

OS: Windows 7
Tomcat: 6.0.26
Struts 2.1.8.1
Java 1.6.0_20

Same software versions of all software on both my OS X machine and my Win7
machine, but when I try to start my Tomcat instance (in Eclipse) in Win7, I
get the following exception:
java.lang.ClassCastException:
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
cannot be cast to javax.servlet.Filter

I actually had a similar issue on my OS X machine previously, but upgrading
to Tomcat .26 fixed the issue.

Similar thread with no clear solution here:
http://www.mail-archive.com/user@struts.apache.org/msg94764.html

I'm not sure what's going on here, after looking at the sources for both
Struts and Tomcat, it appears the implementation of the interface is
correct.
Any help would be appreciated. Thanks in advance.