A Distributed Apllication java.lang.IllegalMonitorStateException: current thread not owner
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Hassan_Shoaib
Posted On:   Friday, June 4, 2004 01:20 AM

java.lang.IllegalMonitorStateException: current thread not owner



I have made a socket based whiteboard application but whenever I run the client there is an error generated at Server Side : as --->



java.lang.IllegalMonitorStateException: current thread not owner at java.lang.Thread.run(Thread.java:479)



and server connection is lost.Kindly help me in this regard that why it is so .. Thanks

Re: A Distributed Apllication java.lang.IllegalMonitorStateException: current thread not owner

Posted By:   Sean_Owen  
Posted On:   Friday, June 4, 2004 07:16 AM

Why not read the javadoc for IllegalStateException first? It should answer your question: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalMonitorStateException.html. You are calling a method like wait() or notify() on an object but have not acquired its lock by using "synchronized" in some way.
About | Sitemap | Contact