Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Classcast Exception in Web APP

0 views
Skip to first unread message

Jithendra K.C

unread,
Nov 17, 2000, 3:00:00 AM11/17/00
to

Hi ,
I am trying to Deploy a application in WebLogic 5.1 as Web app
. I have directory structure like WEB-INF/classes and Web.xml
files. I can fire application also.
The Application first goes from html to Servlet and control goes to JSP page. In JSp page it has to call a servlet. so that time it is giving problem of java.lang.classcastException.
I have set the classpath in Startweblogic file also.
Still it is giving problem

The Error message

Fri Nov 17 17:36:06 GMT+05:30 2000:<E> <ServletContext-hll> exception raised on '/KeepWaiting.jsp'
java.lang.ClassCastException: com.sil.rs.RsDailySalesCompute
at jsp_servlet._keepwaiting._jspService(_keepwaiting.java:104)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)
at com.sil.common.GetStatus.doPost(GetStatus.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)
at com.sil.rs.RsDailySalesForm.doPost(RsDailySalesForm.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Fri Nov 17 17:36:06 GMT+05:30 2000:<E> <ServletContext-hll> Cannot find resource '/WWWErrorPage.jsp' in do
Fri Nov 17 17:36:06 GMT+05:30 2000:<E> <ServletContext-hll> Servlet failed with Exception
java.io.FileNotFoundException: no resource '/WWWErrorPage.jsp' in servlet context root 'D:\weblogic\myserv
at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:235)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:174)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:93)
at jsp_servlet._keepwaiting._jspService(_keepwaiting.java:125)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)
at com.sil.common.GetStatus.doPost(GetStatus.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:143)
at com.sil.rs.RsDailySalesForm.doPost(RsDailySalesForm.java:77)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:105)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Jacek Laskowski

unread,
Nov 21, 2000, 3:00:00 AM11/21/00
to
"Jithendra K.C" wrote:
>
> Hi ,

> In JSp page it has to call a servlet. so that time it is giving problem of java.lang.classcastException.

It means that you cast to wrong class type. Just an oridinary Java
problem:)

> I have set the classpath in Startweblogic file also.

If you hadn't had a class in CLASSPATH, you would've got another
exception like - ClassNotFoundException, nor ClassCastException.

> Fri Nov 17 17:36:06 GMT+05:30 2000:<E> <ServletContext-hll> exception raised on '/KeepWaiting.jsp'
> java.lang.ClassCastException: com.sil.rs.RsDailySalesCompute
> at jsp_servlet._keepwaiting._jspService(_keepwaiting.java:104)

So, having looked at it, I suggest looking at
hll/WEB-INF/_tmp_war/jsp_servlet/_keewaiting.java at line 104. There
should be a line with the error.

Send KeepWaiting.jsp here, so we may be able to take a look at it and
perhaps find the wrong code.

Jacek Laskowski
HP Consulting

Cameron Purdy

unread,
Nov 22, 2000, 3:00:00 AM11/22/00
to
> > In JSp page it has to call a servlet. so that time it is giving problem
of java.lang.classcastException.
>
> It means that you cast to wrong class type. Just an oridinary Java
> problem:)

Often in WebLogic this can be caused by the class being loaded by two
different class loaders. That occurs when there are multiple servlet class
loaders (which will occur in 5.1 if, after starting the server, any servlet
request occurs before a JSP request), or when the class is loaded from
multiple locations (EJB JAR, class path, WAR, server/servletclasses
directories, booth class path, lib, etc.)

Peace,

--
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available


"Jacek Laskowski" <jacek_l...@hp.com> wrote in message
news:3A1A7163...@hp.com...

0 new messages