There are a bunch of issues with this sample, the one you're seeing is
due to the servlet api jar getting included in the webapp dependencies
which conflicts with the one used by the tomcat plugin, but fixing
that wont get far as there are others issues and fixing those will
eventually find that impl.widget doesn't work in webapps -
http://apache.markmail.org/message/dobhps4tgblcyzn5

IMHO instead of spending time fixing that we should change the samples
to use one of the JAX-RS extensions we have now in 2.x and not promote
the old 1.x approaches.

   ...ant

On Fri, May 7, 2010 at 7:49 AM, Henry Saputra <[email protected]> wrote:
> Hi All,
>
> When I tried to run SCA sample-store-webapp sample app from
> sca-java-2.x/trunk/samples/store-webapp using "mvn tomcat:run" command I saw
> this weird class cast exception:
>
> INFO: Starting tomcat server
> May 6, 2010 10:09:13 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
> May 6, 2010 10:09:15 PM org.apache.catalina.core.StandardContext filterStart
> SEVERE: Exception starting filter tuscany
> java.lang.ClassCastException:
> org.apache.tuscany.sca.host.webapp.TuscanyServletFilter cannot be cast to
> javax.servlet.Filter
>     at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:255)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
>     at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
>     at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
>     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
>
> Its weird because org.apache.tuscany.sca.host.webapp.TuscanyServletFilter
> implements javax.servlet.Filter so its should be a safe cast.
> I tried to google this error but couldnt find any link about it.
>
> Has anyone else seen this stack?
>
> - Henry
>

Reply via email to