Hi,

    InvokerServlet.java is a file which is internal to
the Java Web Server if i am *right*.I feel the error
is somewhere in the LoanCalculator.java file itself.

  The classcast Exception could arise because of many
situations: One of them *primarily* being casting an
object to a subclass which is not an instance.

For example:
------------
1)A.java
public class A
{
}

2) B.java
public class B extends A
{
public static void main(String args[])
{
 A a = new A();
 B b = new B();
// Below piece of code compiles successfully but at
run time it gives a ClassCastException.
 b=(B)a;
}
}
-----------
Take a look if you are doing anything like above in
your code.

Madhava


--- Geeta Ramani <[EMAIL PROTECTED]> wrote:
> Hi Sweta:
>
> I am guessing you have a servlet called
> InvokerServlet.java..? If so, look at the
> service method, line number 169 of
> InvokerServlet.java. You are probably trying to
> cast an object of class LoanCalculator to something
> which is "not allowed".
>
> Geeta
>
> Sweta Singh wrote:
>
> > Hi All,
> > I am trying to run my servlet program .
> > I am calling a class file from a HTML file.
> > While running the html file, the form is
> > displayed but when i click on submit button
> > following error is displayed on a new html
> > file.This error is displayed by me only
> > in the program.Can anybody help me to
> > recognise the problem?
> >
> > Error: 500
> > Internal Servlet Error:
> >
> > java.lang.ClassCastException: LoanCalculator
> >         at
>
com.sun.web.core.ServletWrapper.loadServlet(ServletWrapper.java:90)
> >         at
>
com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:109)
> >         at
>
com.sun.web.core.InvokerServlet.service(InvokerServlet.java:169)
> >         at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
> >         at
>
com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:140)
> >         at
>
com.sun.web.core.Context.handleRequest(Context.java:375)
> >         at
> com.sun.web.server.ConnectionHandler.run(Compiled
> Code)
> >
> > Thanks in Advance
> > Sweta
> >
> >
>
___________________________________________________________________________
> > To unsubscribe, send email to
> [EMAIL PROTECTED] and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
http://www.lsoft.com/manuals/user/user.html


__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to