You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Tom Manshreck <th...@minutemannet.com> on 2001/01/29 00:14:51 UTC

IllegalStateException

I've noticed that in my testing environment, if I refresh a page that 
references a
servlet under Tomcat 3.2.1, that I sometimes get an Internal Servlet Error, 
and
an HTTP 500 error. I think this may be due to recompilation of Java classes.

I've searched these boards and seen various references to this type of 
error, but
I'm surprised it happens for me in a somewhat common circumstance. Does
anyone know:

	1) What directly causes this error
	2) If there's any workaround, or do I have to wait until Tomcat 4?

If I just make sure that I shutdown and restart Tomcat whenever I
recompile, am I OK? (Still a pain!)

It would be nice if there was a mechanism to destroy() the Servlet upon
a refresh. Does anyone know of a way to do this?

Thanks,
	Tom

***

Error: 500
Location: /sampleForm.html
Internal Servlet Error:
java.lang.IllegalStateException: Can't happen - classname is null, who 
added this ?
	at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:261)
	at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
	at org.apache.tomcat.core.Handler.service(Handler.java:254)
	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(HttpC 
onnectionHandler.java:210)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)