cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Re: [C2] [TC 4.0m4+] ClassCastException
Date Fri, 01 Dec 2000 18:39:54 GMT
Paul,

Thanks for spending time on this.

Very puzzling - I'll take another look at my libraries, see if there's any reason why I might
have more than one servlet api involved.

Stuart.

On Friday, December 1, 2000, at 06:17 PM, Paul Russell wrote:

> On Thu, Nov 30, 2000 at 09:56:12PM +0000, Stuart Roebuck wrote: 
> > I posted a note on this a while back, but didn't get a response.  Now, I thought
I try again 
> with the lastest CVS versions of Cocoon and Tomcat and see if things had magically started

> working again. 
>  
> Hi Stuart. 
>  
> Sorry about the delay. There definately *shouldn't* be a class cast 
> exception in the location that stack trace points to. It's trying to 
> cast an org.apache.cocoon.environment.http.HttpRequest to a 
> javax.servlet.http.HttpServletRequest, which given the former implements 
> the latter, should be fine. 
>  
> The only thing I can think is that you're compiling against a 
> different version of the servlet api to the one you are running 
> against, although even this *shouldn't* cause this exception. 
>  
> Very odd indeed. The chunk of sitemap involved is: 
>  
>   private List wildcardMatch (int [] pattern, Map objectModel) { 
>     ArrayList list = new ArrayList(); 
>     String uri = ((HttpServletRequest) objectModel.get(         << 
>                     Cocoon.REQUEST_OBJECT)).getRequestURI();    << 
>     if (uri.startsWith("/")) 
>       uri = uri.substring(1); 
>     if (org.apache.cocoon.matching.helpers.WildcardURIMatcher.match ( 
>           list, uri, pattern)) { 
>       return list; 
>     } else { 
>       return null; 
>     } 
>   } 
>  
> and the problem is happening on the highlighted lines. 
> Anyone got any ideas what's causing it? Once again, that exception: 
>  
> > java.lang.ClassCastException: 
> org.apache.cocoon.environment.http.HttpRequest 
> > 	at 
> _Users._stuart._OpenSource._build._tomcat_4_0._webapps._cocoon._sitemap_xmap.wildcardMatch(_sitemap_xmap.java:65)

> > 	at 
> _Users._stuart._OpenSource._build._tomcat_4_0._webapps._cocoon._sitemap_xmap.process(_sitemap_xmap.java:710)

> > [...] 
>  
>  
> Paul. 
>  
> --  
> Paul Russell                               <paul@luminas.co.uk> 
> Technical Director,                   http://www.luminas.co.uk 
> Luminas Ltd. 
>  
>  


** We are currently experiencing prolonged difficulties with our email **
** provider DIGIWEB and INTERLIANT.  To guarantee that your response   **
** is received, please replace "adolos.com" with "adolos.co.uk".       **

-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Lead Developer                                  Mac OS X, Java, XML, etc.
ADOLOS                                             http://www.adolos.com/
Mime
View raw message