You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by dima <db...@openworld.co.uk> on 2001/02/06 20:29:10 UTC

[C2] wierd error on start up with a recent CVS checkout

 Hi everyone,

 Although having successfully complied a very recent copy of C2 from CVS,
I seem to be getting a really weird error (at least to me) when trying to
get it going with Tomcat-4.0-b1.

 If not anything else, I am very curious what does it actually mean.
I have absolutely no idea how could CocoonServlet being an HttpServlet
throw a ClassCastExpection. Or is it maybe a Tomcat problem?

javax.servlet.ServletException: Class org.apache.cocoon.servlet.CocoonServlet
is not a Servlet
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:743)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)
---------
java.lang.ClassCastException: org.apache.cocoon.servlet.CocoonServlet
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:740)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)

thanks,
dima


Re: [C2] wierd error on start up with a recent CVS checkout

Posted by Berin Loritsch <bl...@apache.org>.
dima wrote:
> 
>  Hi everyone,
> 
>  Although having successfully complied a very recent copy of C2 from CVS,
> I seem to be getting a really weird error (at least to me) when trying to
> get it going with Tomcat-4.0-b1.
> 
>  If not anything else, I am very curious what does it actually mean.
> I have absolutely no idea how could CocoonServlet being an HttpServlet
> throw a ClassCastExpection. Or is it maybe a Tomcat problem?

Try rebuilding Cocoon 2 but with the following changes:

Remove the Servlet.jar from the cocoon distribution.
Replace it with Tomcat 4's version.
Rebuild

Hopefully this will fix it.  Tomcat 4.x series is a Servlet 2.3 compliant
server, so make sure that it uses the correct servlet jar.  Cocoon already
has classes that work with Servlet 2.3--but they don't get compiled
unless the jar is in Ant's classpath.

Also, make sure that the Servlet_2_2.jar file is NOT included in the
WEB-INF/lib directory.

> 
> javax.servlet.ServletException: Class org.apache.cocoon.servlet.CocoonServlet
> is not a Servlet
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:743)
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)
> ---------
> java.lang.ClassCastException: org.apache.cocoon.servlet.CocoonServlet
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:740)
> at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:544)
> 
> thanks,
> dima
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

Re: [C2] wierd error on start up with a recent CVS checkout

Posted by Paul Russell <pa...@luminas.co.uk>.
* dima (dberastau@openworld.co.uk) wrote :
>  If not anything else, I am very curious what does it actually mean.
> I have absolutely no idea how could CocoonServlet being an HttpServlet
> throw a ClassCastExpection. Or is it maybe a Tomcat problem?

I suspect you're compiling against servlet 2.2, when tomcat is 2.3. You
need to remove the existing servlet.jar from the cocoon lib directory,
and install the servlet2_3.jar (or whatever it's called) from TC4 in the
lib directory. Rebuild cocoon, and you should find it works.


Paul.

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk