Article View: borland.public.jbuilder.java.language
Article #18229Servlet and Servletrunner problems - HELP!
From: Ed Barrett
Date: Mon, 20 Jul 1998 00:00
Date: Mon, 20 Jul 1998 00:00
72 lines
3160 bytes
3160 bytes
Using: Windows NT Server 4.0, Service Pack 3
JDK 1.1.6 that comes with JBuilder2
JSDK 2.0
I am having difficulties getting servlets to run reliably with the setup
above. I start Servletrunner with the -v option (verbose) in the JSDK
directory. The output which this produces suggests all is well:
servletrunner starting with settings:
port = 8080
backlog = 50
max handlers = 100
timeout = 5000
servlet dir = .\examples
document dir = .\examples
servlet propfile = .\examples\servlet.properties
Next I attempt to use one of the example servlets as follows:
http://localhost:8080/servlet/SimpleServlet
This usually works. However trying some of the other example servlets
yields what can best be described as hit and miss results. On the
occasions when this fails the connection eventually times out. Looking at
the servletrunner's console output I find the following:
java.lang.ClassFormatError
at
at sun.servlet.ServletLoader.loadServlet(ServletLoader.java:91)
at sun.servlet.http.HttpServer.getServlet(Compiled Code)
at sun.servlet.http.HttpServerHandler.sendResponse(Compiled Code)
at sun.servlet.http.HttpServerHandler.handleConnection(Compiled
Code)
at sun.servlet.http.HttpServerHandler.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
My first question is: what might cause this problem? This looks like trace
from the JSDK, and seems to suggest that the class that it (the HttpServer)
is trying to load is not of the correct format. Does this mean that it's
not a valid servlet class - and if so, how, since the classes nominated are
servlet classes which come as part of the JSDK?
From scanning the srun.c code it seems that what srun.exe /
servletrunner.exe do is simply to package up a invokation of the HttpServer
application with appropriate environment and arguments as follows:
Java.exe sun.servlet.http.HttpServer
I haven't yet started trying to debugg this (I'm hoping I won't have to!).
I apologise if any of the above is already well understood on this
newsgroup - I've only just started looking at servlets, and only have a
matter of weeks to complete my project! So far I have to confess it has
been a dispiriting experience. Instead of being able to concentrate on the
business of writing the software, I have expended a great amount of time
and energy on set-up issues - so far to no useful effect.
If anyone can point me to a good FAQ on dealing with the problems above, or
recommend a good approach to working around these problems I would be very
grateful.
Ed Barrett
Technical Details
Message-ID:
<6ovm3b$hn55@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a2229651c14b31fd,start X-Google-Attributes: gidf74b3,public From: "Ed Barrett" <ed@sysgenics.com> Subject: Servlet and Servletrunner problems - HELP! Date: 1998/07/20 Message-ID: <6ovm3b$hn55@forums.borland.com> X-Deja-AN: 373178492 Organization: Another Netscape Collabra Server User X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Newsgroups: borland.public.jbuilder.java.language