tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Treves" <dw...@macam.ac.il>
Subject Re: ClassCastException uppon requests
Date Thu, 18 Oct 2001 06:33:01 GMT
Hi, I went through a simple tutorial just to make sure my Tomcat is
installed properly, but I just realized that I can only see the main page of
the Tomcat (the welcome page under ROOT dir). When I try to access either
JSP or servlets exapmles I ge the 404 error.

I am using Tomcat 4.0 on win2000. I used the EXE installation file.

Here is the exception I copied from the examples log file:

2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
initialized event to listener instance of class listeners.SessionListener
java.lang.LinkageError: loader constraints violated when linking
javax/servlet/ServletContext class
 at listeners.SessionListener.contextInitialized(SessionListener.java:163)
 at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
3201)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3385)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:261)
 at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:172
)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)

2001-10-18 08:25:08 StandardContext[/examples]: Context startup failed due
to previous errors
2001-10-18 08:25:08 StandardContext[/examples]: Exception sending context
destroyed event to listener instance of class listeners.ContextListener
java.lang.IncompatibleClassChangeError
 at listeners.ContextListener.log(ContextListener.java:177)
 at listeners.ContextListener.contextDestroyed(ContextListener.java:147)
 at
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3
241)
 at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3443)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3415)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at
org.apache.catalina.startup.CatalinaService.start(CatalinaService.java:261)
 at
org.apache.catalina.startup.CatalinaService.execute(CatalinaService.java:172
)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:42
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:28)
 at java.lang.reflect.Method.invoke(Method.java:313)
 at
org.apache.catalina.startup.BootstrapService.main(BootstrapService.java:360)



Thanks for your time!  :o)
David.
----- Original Message -----
From: "Craig R. McClanahan" <craigmcc@apache.org>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, October 17, 2001 9:16 PM
Subject: Re: ClassCastException uppon requests


> The usual culprit is having a servlet.jar file in your
> $JAVA_HOME/jre/lib/ext directory, or otherwise messing around with where
> Tomcat sets up JAR files.
>
> Craig
>
>
> On Wed, 17 Oct 2001, David Treves wrote:
>
> > Date: Wed, 17 Oct 2001 19:52:26 +0200
> > From: David Treves <dwork@macam.ac.il>
> > Reply-To: tomcat-user@jakarta.apache.org
> > To: tomcat-user@jakarta.apache.org
> > Subject: ClassCastException uppon requests
> >
> > Hi,
> >
> > I wrote a very simple servlet that supposed to receive 2 parameters from
a
> > form (POST method) and write them on screen.
> >
> >
> > the doPost() method is too simple... getting the PrintWriter and
printing
> > one line with both parameters...
> >
> > Am I missing something here?
> > Why doesn't it point to a line of error in MY servlet code?
> >
> > everytime I try to submit the data to the servlet I get the collowing
error:
> >
> >
> > A Servlet Exception Has Occurred
> > java.lang.ClassCastException: servlets.LoginServlet
> >  at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:832)
> >  at
> >
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:621)
> >  at
> >
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java
> > :396)
> >  at
> >
org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:180)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1125)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> >  at
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:247)
> >  at
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:193)
> >  at
> >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:243)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
> >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:215)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> >  at
> >
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> > 46)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 64)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
> >
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
> >  at
> >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
> > )
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> >  at
> >
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 64)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
> >
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :163)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
> > 66)
> >  at
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> >  at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> >  at
> >
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
> > 1005)
> >  at
> >
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1098
> > )
> >  at java.lang.Thread.run(Thread.java:539)
> >
> >
> > Thanks in advance!
> > David.
> >
> >


Mime
View raw message