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: error while running servlet undet tomcat in Linux Red Hat
Date Mon, 02 Dec 2002 13:17:39 GMT
Howdy,
How many servlet.jar files do you have loaded? ;)  You probably have an
extra one somewhere, e.g. in your /WEB-INF/lib.  You should remove
those, and only keep the one that comes with tomcat.  Moreover, it looks
like your extra servlet.jar file is v2.2 (or maybe older)...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Abhijat Thakur [mailto:athakur@bdnacorp.com]
>Sent: Wednesday, November 27, 2002 7:01 PM
>To: tomcat-user@jakarta.apache.org
>Subject: error while running servlet undet tomcat in Linux Red Hat
>
>Hi,
>
>I wrote a small test servlet(TestingServlet.java) and tried to run the
>servlet under tomcat(4.1.12) on Linux Red Hat. I get the underlying
error.
>The doGet Method of TestingServlet is also enclosed. What is going
wrong
>here. The line 37 is in bold.
>
>public void doGet(HttpServletRequest req, HttpServletResponse res){
>        HttpSession session = null;
>        System.out.println("In doGet");
>        session = req.getSession(true);
>        if(session != null){
>            session.setAttribute("testingTesting","Session
Works!!");//line
>37
>            System.out.println("Session Id in servlet:"+
session.getId());
>        }
>        else {
>            System.out.println("Session in servlet is null!");
>        }
>        res.setContentType("text/html");
>        PrintWriter out  = null;
>        try{
>            out = res.getWriter();
>        }
>        catch(java.io.IOException excep){}
>        out.println("<html><head><title>test</title></head><body>");
>        out.println("<script>");
>        out.println("</script></html>");
>}
>
>javax.servlet.ServletException: Servlet execution threw an exception
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:269)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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
>ava:191)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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:23
96)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>	at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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
>keNext(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
05)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:380)
>	at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:533)
>	at java.lang.Thread.run(Thread.java:484)
>root cause
>java.lang.NoSuchMethodError
>	at
>org.apache.catalina.session.StandardSession.setAttribute(StandardSessio
n.ja
>va:1262)
>	at
>org.apache.catalina.session.StandardSessionFacade.setAttribute(Standard
Sess
>ionFacade.java:191)
>	at
>org.apache.catalina.session.StandardSessionFacade.setAttribute(Standard
Sess
>ionFacade.java:191)
>	at
com.bdna.pl.servlet.TestingServlet.doGet(TestingServlet.java:37)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:247)
>	at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>	at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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
>ava:191)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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:23
96)
>	at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>	at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>	at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2)
>	at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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
>keNext(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
05)
>	at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:380)
>	at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>	at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:533)
>	at java.lang.Thread.run(Thread.java:484)
>
>thanks
>
>abhijat
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-
>help@jakarta.apache.org>


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


Mime
View raw message