You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Ruiz Moyano, Juan Pablo" <jp...@es.wanadoo.com> on 2003/07/17 09:15:27 UTC
[BeanUtils]. Getting IllegalMonitorStateException
I receive IllegalMonitorStateException when I invoke the PropertyUtils.getProperty method.
public class Runner implements Runnable {
public Runner() {
Thread thread = new Thread(this);
synchronized( thread ) {
thread.start();
}
}
public void run() {
...
...
MyClass myclass = new MyClass();
Object value = PropertyUtils.getProperty( myclass , propertyX );
java.lang.IllegalMonitorStateException: current thread not owner
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUtils.java:957)
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUtils.java:979)
at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java, Compiled Code)
at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1172)
at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java, Compiled Code)
at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
...
..
at Runner.run(Runner.java:83)
at java.lang.Thread.run(Thread.java:479)
Any help/suggestions ?
Thanks
Re: [BeanUtils]. Getting IllegalMonitorStateException
Posted by José Antonio Pérez Testa <ja...@indra.es>.
Could you give a more details on the insides of 'MyClass' ?
I gess the problem is inside that class and not in beanutils. You must
review all your wait() and notify() calls, because there is the
source of throwing IllegalMonitorStateException
Suerte Maestro!
Ruiz Moyano, Juan Pablo wrote:
>I receive IllegalMonitorStateException when I invoke the PropertyUtils.getProperty method.
>
>public class Runner implements Runnable {
> public Runner() {
> Thread thread = new Thread(this);
> synchronized( thread ) {
> thread.start();
> }
> }
> public void run() {
> ...
> ...
> MyClass myclass = new MyClass();
> Object value = PropertyUtils.getProperty( myclass , propertyX );
>
> java.lang.IllegalMonitorStateException: current thread not owner
> at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUtils.java:957)
> at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(PropertyUtils.java:979)
> at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java, Compiled Code)
> at org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(PropertyUtils.java:1172)
> at org.apache.commons.beanutils.PropertyUtils.getNestedProperty(PropertyUtils.java, Compiled Code)
> at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:801)
> ...
> ..
> at Runner.run(Runner.java:83)
> at java.lang.Thread.run(Thread.java:479)
>
>Any help/suggestions ?
>
>Thanks
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>