cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent Johnson <>
Subject Re: Hibernate Tutorial + Jetty and ClassCastException
Date Thu, 22 Sep 2005 22:03:38 GMT
Found the problem.  Some jar files in the classpath were different
versions so it was causing the ClassCastException.  I chopped down the
classpath to only what was expressly needed to start the webapp and it

- Brent

On 9/22/05, Brent Johnson <> wrote:
> I have a Cocoon webapp based on the latest version of Cocoon.  It uses
> Hibernate and the "HibernateFiler" idea posted on the Wiki
> (HibernateWithCocoon Tutorial or something similarly named).  The app
> works great under Tomcat and has for a while, but if I try and start
> it using Jetty I get the following exception:
> java.lang.ClassCastException
> ...snip...
>     at org.apache.cocoon.servlet.CocoonServlet.service(
>     at javax.servlet.http.HttpServlet.service(
>     at org.mortbay.jetty.servlet.ServletHolder.handle(
>     at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(
>     at com.myapp.hibernate.HibernateFilter.doFilter(
>     at org.mortbay.jetty.servlet.WebApplicationHandler$Chain.doFilter(
>     at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(
>     at org.mortbay.jetty.servlet.ServletHandler.handle(
>     at org.mortbay.http.HttpContext.handle(
>  ...snip...
> Line 32 of my HibernateFilter is this:
> chain.doFilter(request, response);
> So when it calls that, whammo ClassCastException.  This exact same
> webapp works fine under Tomcat.  Anyone have any ideas where I should
> look to track down the problem?  I've looked in my log4j logs,
> nothing.  I looked in the WEB-INF/logs and the only thing I get is
> that exception.  It looks like Hibernate starts fine and everything is
> going well, but when I hit the first page in my webapp I get a
> ClassCastException.
> Thanks.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message