Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

error 500

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
yan luo
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!!
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!