99.9% cause of this is having servlet.jar in the wrong place (it belongs
in $CATALINA_HOME/commons/lib *only*), having it in your Java extensions
directory ($JAVA_HOME/jre/lib/ext), or hacking it in to the CLASSPATH when
Tomcat is started.
In particular, IIRC, Cocoon (at least for a while) was including a copy of
servlet.jar inside the webapp's /WEB-INF/lib directory. It should
absolutely *not* be there.
Craig McClanahan
On Thu, 23 Aug 2001, Marcus Crafter wrote:
> Date: Thu, 23 Aug 2001 18:34:27 +0200 (CEST)
> From: Marcus Crafter <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: Tomcat User Mailing List <[EMAIL PROTECTED]>
> Subject: class xxx is not a servlet ?
>
> Hi All,
>
> Hope all is well.
>
> Just tried to see how our applications works with TC4B7. We're getting
> the following exception in our log file, telling us that our servlet
> class is not a servlet:
>
> 2001-08-23 18:24:31 StandardContext[/diva-fs2]: Servlet /diva-fs2 threw load()
>exception
> javax.servlet.ServletException: Class dreba.prj.fs2.fdn.portal.Portal is not a S
> ervlet
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81
> 3)
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3240)
> .... <cut> ....
> ----- Root Cause -----
> java.lang.ClassCastException: dreba.prj.fs2.fdn.portal.Portal
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:80
> 9)
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
> t.java:3240)
>
> Portal class derives from CocoonServlet, which derives in turn from
> HttpServlet. I've compiled our application with the servlet.jar from
> TC4B7, but I still get the same exception. The application
> works fine with TC323.
>
> Any ideas what this could be ?
>
> Cheers,
>
> Marcus
>
>
> --
> .....
> ,,$$$$$$$$$, Marcus Crafter
> ;$' '$$$$: Computer Systems Engineer
> $: $$$$: Open Software Associates GmbH
> $ o_)$$$: 82-84 Mainzer Landstrasse
> ;$, _/\ &&:' 60327 Frankfurt Germany
> ' /( &&&
> \_&&&&' Email : [EMAIL PROTECTED]
> &&&&. Business Hours : +49 69 9757 200
> &&&&&&&:
>
>