Classcast exception using tomcat plugin

I posted this at the tomcat plugin location here as well:

We are using a Jersey web service in tomcat. When I start up “gradle tomcatRun” we always get this:

java.lang.ClassCastException: com.sun.jersey.spi.spring.container.servlet.SpringServlet cannot be cast to javax.servlet.Servlet

The problem appears to be this dependency:

compile(group: ‘com.sun.jersey’, name: ‘jersey-spring’, version: ‘1.11’), I am not sure how to solve this one…I saw a similar issue in the FAQ here:, however the solution suggested doesn’t solve the cast exception.

thanks for any thoughts.


For everybody interested we moved the discussion to a GitHub issue: