Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 29989 invoked from network); 3 Jul 2004 13:23:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Jul 2004 13:23:44 -0000 Received: (qmail 40477 invoked by uid 500); 3 Jul 2004 13:23:20 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 40367 invoked by uid 500); 3 Jul 2004 13:23:19 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 40282 invoked by uid 99); 3 Jul 2004 13:23:19 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 03 Jul 2004 06:23:16 -0700 Received: (qmail 32719 invoked by uid 65534); 3 Jul 2004 13:23:11 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO [139.18.183.69]) (139.18.183.69) by mail.gmx.net (mp026) with SMTP; 03 Jul 2004 15:23:11 +0200 X-Authenticated: #3483660 Message-ID: <40E6B354.5050406@gmx.de> Date: Sat, 03 Jul 2004 15:23:32 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: dev@cocoon.apache.org CC: users@cocoon.apache.org Subject: Re: JspGenerator doesn't work from flow but does otherwise... References: <20040702150114.69634.qmail@web52609.mail.yahoo.com> In-Reply-To: <20040702150114.69634.qmail@web52609.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On 02.07.2004 17:01, Terry Brick wrote: >>> Weird problem. I have a small test JSP that I'm accessing using >>> JspGenerator. It works fine if I hit it straight from the >>> browser (with a URL that matches pipeline in my sitemap) but it >>> fails if I call the exact same thing from my flow script using >>> sendPage("hello.jsp"). > ------------------------------------------------- > URL That Works > ------------------------------------------------- > http://localhost:8080/Cocoon/jsptest/hello.jsp > > ------------------------------------------------- > URL That Doesn't Work > ------------------------------------------------- > http://localhost:8080/Cocoon/jsptest/jspflow >>> Here's the Exception Stack Trace Original Exception: java.lang.ClassCastException at org.apache.jasper.compiler.JspRuntimeContext.(JspRuntimeContext.java:153) at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:132) at org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java:71) I did remote debugging to find out what caused the ClassCastException. After I have found the correct Tomcat sources - what a hell - I found the reason: http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspRuntimeContext.java?annotate=1.4.2.5&only_with_tag=TOMCAT_4_1_24#151 The code does: Thread.currentThread().getContextClassLoader() and tries to cast it to URLClassLoader. While it does not fail for "hello.jsp" (classloader is of type WebappClassLoader) it fails for "jspflow" (classloader is of type CompilingClassLoader). What do you suggest for fixing it? Is it possible to let our CompilingClassLoader extend URLClassLoader? Or shall we hint to Tomcat community that there are also other classloaders? Shall the JSPEngine restore a "normal" classloader? Joerg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org