-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Gaurav Kishore wrote:

> -----------------------------
> Please read the FAQ!
> <http://java.apache.org/faq/>
> -----------------------------
>
> Hi,
>
> Could anybody let me know what the following error means :
>
> java.lang.ClassCastException: org.apache.jserv.JServConnection
> at com.forum.dynmodel.ui.TestPage.createPage(Compiled Code)
>  at com.aci.appserver.AppServer.service(Compiled Code)
>  at javax.servlet.http.HttpServlet.service(Compiled Code)
>  at org.apache.jserv.JServConnection.processRequest(Compiled Code)
>  at org.apache.jserv.JServConnection.run(Compiled Code)
>  at java.lang.Thread.run(Compiled Code)
>
> I am trying to run a servlet class named TestPage and most of the error
> above refer to custom classes which we have built.
>
> Any help is appreciated!
>

Well, a ClassCastException means you are trying to use a Java cast
operator, but the classes on the left side and right side are not
compatible.  Example:  assume you have a class Fruit with subclasses Apple
and Pear that extend Fruit.  You can always cast an Apple to a Fruit, or a
Pear to a Fruit, and sometimes cast a Fruit to an Apple or Fruit to a
Pear, but you can't cast an Apple to a Pear.

To be able to help any, we'd have to see the source code inside your
TestPage.createPage() method that is triggering the exception --
particularly any reference you are making to JServConnection.  By the way,
why would you be referring to one of the internal classes of Apache JServ
in the first place?

>
> TIA
> Gaurav
>

Craig McClanahan




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to