You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Benjamin John Turner <bj...@WhoWhere.Com> on 2000/06/08 20:18:05 UTC
IllegalMonitorStateException?
Under moderately heavy load on a single, trivial test servlet,
I'm getting the following error every once in a while from Tomcat 3.1
under solaris with Sun's java 1.2. Does anyone know why this is
happening or what it means?
================
Context log: path="/examples" <b>Internal Servlet Error:</b><br>
<pre>
java.lang.IllegalMonitorStateException: current thread not owner
at java.lang.String.<init>(Compiled Code)
at java.lang.StringBuffer.toString(Compiled Code)
at test.HelloWorld.doGet(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code)
at org.apache.tomcat.servlets.InvokerServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.tomcat.core.ServletWrapper.handleRequest(Compiled Code)
at org.apache.tomcat.core.ContextManager.service(Compiled Code)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Compiled
Code)
at org.apache.tomcat.service.TcpWorkerThread.run(Compiled Code)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
</pre>
=================
Benjamin Turner
bjturner@whowhere.com
Re: IllegalMonitorStateException?
Posted by William Brogden <wb...@bga.com>.
Benjamin John Turner wrote:
>
> Under moderately heavy load on a single, trivial test servlet,
> I'm getting the following error every once in a while from Tomcat 3.1
> under solaris with Sun's java 1.2. Does anyone know why this is
> happening or what it means?
>
> ================
> Context log: path="/examples" <b>Internal Servlet Error:</b><br>
> <pre>
> java.lang.IllegalMonitorStateException: current thread not owner
> at java.lang.String.<init>(Compiled Code)
> at java.lang.StringBuffer.toString(Compiled Code)
> at test.HelloWorld.doGet(Compiled Code)
> at javax.servlet.http.HttpServlet.service(Compiled Code)
> at javax.servlet.http.HttpServlet.service(Compiled Code)
.... etc
It is something to do with methods that require a Thread to have
obtained a lock on an object (become the owner) - typically
synchronized blocks, the wait() method or the notify() method
is involved.
--
WBB - wbrogden@bga.com Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at http://www.lanw.com/java/javacert/