aspose file tools*
The moose likes Servlets and the fly likes error 500 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "error 500" Watch "error 500" New topic
Author

error 500

yan luo
Greenhorn

Joined: Jan 29, 2001
Posts: 5
When I run my first JSP, it did work. but follwing the output is
Error: 500
Location: Location: /examples/jsp/hello.jsp
Internal Servlet Error:
javax.servlet.ServletException: javax.servlet.ServletResponse: method flushBuffer()V not found
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
Root cause:
java.lang.NoSuchMethodError: javax.servlet.ServletResponse: method flushBuffer()V not found
at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:207)
at _0002fhello_0002ejsphello_jsp_0._jspService(_0002fhello_0002ejsphello_jsp_0.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
Can someone tell me how to solve this problem?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
That is almost certainly due to an old jar file from an earlier version of the servlet API. For me it was a jsdk.jar that was on the classpath and was found before the current servlet.jar
Older version of ServletResponse didn't have flushBuffer()
Bill

------------------
author of:
yan luo
Greenhorn

Joined: Jan 29, 2001
Posts: 5
Thanks for your reply.
But I don't think I include old servlet.jar under my classpath.
The following is my classpath:
Set CLASSPATH=.;%TOMCAT_HOME%\lib\servlet.jar;
C:\JDK1.2.2\LIB\TOOLS.JAR
SET CLASSPATH=C:\PROGRA~1\ASYMET~1\SHARED~1JAVA\LIBJAVA.JAR;
C:\JDK1.2.2BIN;
C:\Java\Decompiler\SouceTech;
C:\PROGRA~1\SQLLIB\java\db2java.zip;
C:\PROGRA~1\SQLLIB\java\runtime.zip;
C:\PROGRA~1\SQLLIB\java\sqlj.zip;
C:\PROGRA~1\SQLLIB\bin;
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Set CLASSPATH=.;%TOMCAT_HOME%\lib\servlet.jar;C:\JDK1.2.2\LIB\TOOLS.JAR
SET CLASSPATH=C:\PROGRA~1\ASYMET~1\SHARED~1JAVA\LIBJAVA.JAR;

well, you know, different people do different things....
on the first set line of the classpath, you set it and
then reset it with set classpath again.
I would suggest that you change the second set classpath
to the foll.:
SET CLASSPATH=%CLASSPATH%;C:\PROGRA~1\ASYMET~1\SHARED~1JAVA\LIBJAVA.JAR
Two changes:
- %classpath%; in front and
- remove the semi-colon at the end.
hope this is one of the things that will help.
regds.
- satya

[This message has been edited by Madhav Lakkapragada (edited January 29, 2001).]


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
yan luo
Greenhorn

Joined: Jan 29, 2001
Posts: 5
I set classpath as following:
Set CLASSPATH=.;%TOMCAT_HOME%\lib\servlet.jar;
C:\JDK1.2.2\LIB\TOOLS.JAR
SET CLASSPATH=%CLASSPATH%;C:\PROGRA~1\ASYMET~1\SHARED~1JAVA\LIBJAVA.JAR
but still have same problem.
Thanks for any suggestion. I have spent two days on
this problem, still cann't figure out.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

okay, could you post some addl info on how you are doing things?
ie; what tomcat version, jdk version,
how you are accessing your jsp? and where you are
putting the jsp file?
just to get an idea.....
regds.
- satya
yan luo
Greenhorn

Joined: Jan 29, 2001
Posts: 5
Hi,satya
the enviorment of my JSP is:
TOMCAT Version 3.2.1
jdk1.2.2
Win98
hello.jsp file:

</HTML>
The hello.jsp is under http://localhost:8080/examples/hello.jsp
C:\Tomcat\webapps\examples\hello.jsp
The result is as follows:
Hello! The time is now Tue Jan 30 10:04:37 EST 2001
Error: 500
Location: /examples/hello.jsp
Internal Servlet Error:
javax.servlet.ServletException: javax.servlet.ServletResponse: method flushBuffer()V not found
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
Root cause:
java.lang.NoSuchMethodError: javax.servlet.ServletResponse: method flushBuffer()V not found
at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:207)
at _0002fhello_0002ejsphello_jsp_0._jspService(_0002fhello_0002ejsphello_jsp_0.java:70)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java, Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
at java.lang.Thread.run(Thread.java, Compiled Code)
It seems it works OK. But it's followed by strange error message.
Thank you for your time.
Ramneek Handa
Ranch Hand

Joined: Nov 10, 2000
Posts: 44
Hello Yan,
you are using tomcat 3.2 with jdk1.2, I feel if you install jdk1.3 your problem will get solved.
I am amazed how your tomcat server is getting started as I had tried using tomcat 3.1 with jdk1.2 and it had asked me to install jdk1.3 as it works with that only. I updated jdk1.2 to jdk1.3 and it worked so you better try with jdk1.3.
best of luck.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

Ramneek:
thats' one option. But I will be curious to know why tomcat
says so....since I am with JDK1.2.2. and use tomcat 3.2 on
win98. again, just techincal interest.
regds.
- satya
yan luo
Greenhorn

Joined: Jan 29, 2001
Posts: 5
Is there someone can help me?
When I run servlet with jdbc, it works very fine.
I just wonder why there is problem about running JSP?
Thanks a lot!!!
 
 
subject: error 500