Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why java.lang.NoSuchMethodError?

3 views
Skip to first unread message

John

unread,
Feb 4, 2003, 3:28:05 PM2/4/03
to
Hi, not sure about this error, can you help?

Every time I call this method

private void gotoPage(String address,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(address);
dispatcher.forward(request, response);
}

I get the following errors:

java.lang.NoSuchMethodError
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:462)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:484)

I am using Apache/Jserv. A search at this NG seems to indicate that it
is because Jserv implements servlet 2.0 specs, which does not have
ServletContext.getRequestDispatcher
, makes sense. But why was I able to compile the servlet if this
method is missing? I am pretty certain Jserv uses the same servlet.jar
as the one I put in the CLASSPATH when I compiled the servlet.

- John

Jon Skeet

unread,
Feb 4, 2003, 5:27:59 PM2/4/03
to

I rather suspect it doesn't. In fact, I seem to dimly remember that
servlet.jar didn't come into until 2.2 - I think it was called something
else before, although I can't remember what.

I'd suggest changing to Tomcat though - 2.0 and JServ are rather
outdated these days...

--
Jon Skeet - <sk...@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too

John

unread,
Feb 5, 2003, 6:31:23 PM2/5/03
to
Thanks. My follow-up post yesterday might not have gone through. Were
you able to replace Jserv with Tomcat? I am using Apache, ORACLE 9i on
WinXP. Are there any issues one should be aware of when replacing
Jserv with Tomcat? Where can I find DOCS on how to hook up Tomcat with
Apache?

- John


Jon Skeet <sk...@pobox.com> wrote in message news:<MPG.18aa4ecb2...@dnews.peramon.com>...

Jon Skeet

unread,
Feb 6, 2003, 3:36:10 AM2/6/03
to
John <jbrads...@yahoo.com> wrote:
> Thanks. My follow-up post yesterday might not have gone through. Were
> you able to replace Jserv with Tomcat?

Yes, quite easily.

> I am using Apache, ORACLE 9i on
> WinXP. Are there any issues one should be aware of when replacing
> Jserv with Tomcat? Where can I find DOCS on how to hook up Tomcat with
> Apache?

All the answers are at http://jakarta.apache.org/tomcat

0 new messages