tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat4.1.18 and ClassCastException.
Date Tue, 11 Feb 2003 17:38:12 GMT
Howdy,
A few suggestions:

- Could it be that ClassA is not in the classpath that the JSP is in?
Then Jasper won't be able to find ClassA.

- Have you looked at the servlet generated when your JSP is compiled?
Can you precompile your JSP (use jspc) without errors?

- Usually, underlined method names (_open in your example) indicate an
internal-type method that external apps shouldn't be calling.  Are you
sure you're using ClassA properly?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Prasad Parigi [mailto:pparigi@issinfo.com]
>Sent: Tuesday, February 11, 2003 12:10 PM
>To: 'Tomcat Users List'
>Subject: Tomcat4.1.18 and ClassCastException.
>
>Hi,
>
>	I am new to this mailing list and I get the following error
while
>using Tomcat. I tried out all options to resolve this. Any help is
>appreciated. If this is not a proper way of communication, please let
me
>know.
>
>I get an error "ClassCastException" when I try to use this line of code
in
>my JSP. This is using a Object database called CacheDatabase.
>
>
>
>testclass = (ClassA)ClassA._open(dbconnection);
>
>
>
>The return type from open is of type ClassA.
>
>
>
>org.apache.jasper.JasperException: Unable to process TestTomcat Page
>        at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.j
ava:
>2
>48)
>        at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295
)
>        at
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>        at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>n
>FilterChain.java:247)
>        at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>h
>ain.java:193)
>        at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>a
>va:260)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>        at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>a
>va:191)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>        at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:24
15)
>        at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0
>)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.
>java:170)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:641)
>        at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2
>)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:641)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>        at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a
>:174)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>k
>eNext(StandardPipeline.java:643)
>        at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>        at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>        at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>        at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
32)
>        at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>e
>ction(Http11Protocol.java:386)
>        at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
34)
>        at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>v
>a:530)
>        at java.lang.Thread.run(Thread.java:484)
>
>
>            Please help me on this as I have no idea why it shouldn't
work.
>It works fine on Jrun4 which also implements the JSP/Servlet version.
>
>
>
>Thanks,
>
>Prasad.
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message