RE: IllegalStateException
RE: IllegalStateException
- Subject: RE: IllegalStateException
- From: "Shelli D. Orton" <email@hidden>
- Date: Fri, 27 May 2005 10:37:28 -0600
- Importance: Normal
Hmm. We're not doing any explicit editing context locking on any of our
pages. We've restarted the app and so far it hasn't happened again, but
sure would be nice to know what caused it.
Thanks,
Shelli
-----Original Message-----
From: Chuck Hill [mailto:email@hidden]
Sent: Friday, May 27, 2005 10:25 AM
To: Shelli D. Orton
Cc: Apple WebObjects List; Webobjects-Dev
Subject: Re: IllegalStateException
On May 27, 2005, at 9:17 AM, Shelli D. Orton wrote:
> Hi
>
> My woapp is taking a long time to set a checkbox setting (30+ minutes).
My, that is slow! :-) Sounds like your application is hung.
> I
> looked in the logs and am getting this exception:
>
> 2005-05-27 11:28:55 StandardManager[/xxxxx] processsExpire: Exception
> during session expiration
> java.lang.IllegalStateException: Illegal Lock usage: unlocking thread
> not
> owner.
> at
> com.webobjects.foundation.NSRecursiveLock.unlock(NSRecursiveLock.java:
> 207)
> at
> com.webobjects.eocontrol.EOEditingContext.unlock(EOEditingContext.java:
> 4611)
> at
> com.webobjects.appserver.WOSession.terminate(WOSession.java:541)
> at
> com.webobjects.appserver.WOSession._terminateByTimeout(WOSession.java:
> 518)
> at
> com.webobjects.jspservlet._WOSessionWatcher.valueUnbound(_WOSessionWatc
> her.j
> ava:25)
> at
> org.apache.catalina.session.StandardSession.removeAttribute(StandardSes
> sion.
> java:1143)
> at
> org.apache.catalina.session.StandardSession.expire(StandardSession.java
> :628)
> at
> org.apache.catalina.session.StandardSession.expire(StandardSession.java
> :601)
> at
> org.apache.catalina.session.StandardManager.processExpires(StandardMana
> ger.j
> ava:763)
> at
> org.apache.catalina.session.StandardManager.run(StandardManager.java:
> 840)
> at java.lang.Thread.run(Thread.java:536)
>
> Has anyone seen this before and/or know what causes this type of
> exception?
>
>
That happens if the previous request for that session left one or more
outstanding locking on the defaultEditingContext(). This can happen if
you are locking/unlocking in awake()/sleep() in the page. If you do
that, you need to also keep a flag to prevent locking more than once.
A much better solution is to use the MultiECLockManager (available from
wocode) or ERXEC from Project Wonder.
Chuck
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden