[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: java.lang.ClassCastException


Hello,

I've got the same problem this morning.
The solution is that you can extend (<%@ page
extends="fr.escape.db.HttpJspPageDBEnabled" %>)  you JSP page from only the
"org.gjt.jsp.HttpJspPageImpl" class (or sub-class) or from a class that
implement the interface "org.gjt.jsp.HttpJspPage".

Bye, ;-)

    Fred



----- Original Message -----
From: Jason pratt <glorybox@umich.edu>
To: <gnujsp@gjt.org>
Sent: Tuesday, October 19, 1999 6:04 PM
Subject: java.lang.ClassCastException


> Hi. I've spent most of the evening trying to upgrade to the new
> gnujsp1.0.0 package (and JServ 1.1b2.) My current configuration is:
>
> - RedHat Linux 5.2 (kernel 2.0.36)
> - Apache 1.3.6
> - JServ 1.1b2
> - Blackdown JDK 1.1 (and 1.2 - i get the same error with both.)
> - JSDK 2.0
>
> My previous (working) configuration was Jserv 1.0, gnujsp 0.9x
>
> I have configured gnujsp according to carsten's INSTALL.apache document
> (gnujsp + jserv 1.0 was working before, so i'm pretty sure the config's
> are correct - that is, all the classpath's etc are in place.)
>
> The error i get when trying to access any jsp page *that utilises any of
> the utility classes that i have written* (all of which are debugged and
> working under 0.9x) is:
>
> Exception while servicing request for /demo/test.jsp:
>
> java.lang.ClassCastException: jsp__demo__test_2ejsp
>         at org.gjt.jsp.JspServlet$Page.load(JspServlet.java:929)
>         at org.gjt.jsp.JspServlet$Page.process(JspServlet.java:628)
>         at org.gjt.jsp.JspServlet.service(JspServlet.java:284)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>         at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
>         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>         at java.lang.Thread.run(Thread.java)
>
> The source code for the jsp file is, basically:
>
>
> <%@ page import = "my.package.*" %>
> <%@ page extends = "myCustomServlet" %>
>
> Hi.
>
>
> Where myCustomServlet is in:
>
> /usr/local/apache/classes/my/package/myCustomServlet.class
>
> and jserv.properties contains the line:
>
> wrapper.classpath=/usr/local/apache/classes/
>
> (with or without the trailing slash it hasn't made a difference.) All file
> permissions are webserver read/writeable. The servlets are being compiled
> into the correct path (specified with the 'scratchdir' arg for gnujsp.)
> This scratchdir is also listed as a repository for the zone in which
> gnujsp is operating.
>
> Again, this mechanism worked correctly under jsp 0.9x. I am completely
> stumped. Any help would be appreciated. If more information would be
> helpul, please let me know. Thanks!
>
> ::ja
> jas@theOrange.com