jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ChadDavis <chadmichaelda...@gmail.com>
Subject Re: unexpected error on Node.isLocked()
Date Mon, 08 Nov 2010 23:16:24 GMT
On Fri, Nov 5, 2010 at 1:47 PM, ChadDavis <chadmichaeldavis@gmail.com> wrote:
> I'm checking to see if nodes are locked.  The ones locked, and not
> available to the current session via it's attached tokens, throw this
> error:
>
> javax.jcr.lock.LockException: Precondition Failed
>        at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:109)
>        at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:51)
>        at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:45)
>        at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.getLockInfo(RepositoryServiceImpl.java:1372)
>        at org.apache.jackrabbit.jcr2spi.WorkspaceManager.getLockInfo(WorkspaceManager.java:250)
>        at org.apache.jackrabbit.jcr2spi.lock.LockManagerImpl.buildLockState(LockManagerImpl.java:321)
>        at org.apache.jackrabbit.jcr2spi.lock.LockManagerImpl.getLockImpl(LockManagerImpl.java:392)
>        at org.apache.jackrabbit.jcr2spi.lock.LockManagerImpl.isLocked(LockManagerImpl.java:165)
>        at org.apache.jackrabbit.jcr2spi.NodeImpl.isLocked(NodeImpl.java:1259)
>
> The API doesn't really suggest what would cause this.  I'm at a loss.
>

After some debugging, I find that this is bubbling up from the
httpclient api.  There's a recylce method on the http method classes
that is supposed to reset the http object for re-use.  I have no idea
why this works sometimes, and not others.  I suspect my unoptimized
code ( I've got far too many trips to the repo ) is revealing this.
I'm going to fix my code to not make so many trips.

Oddly enough, all of my trips to the repo during the processing of the
request don't cause a problem.  It's some trips to the repo triggered
by method calls in my presentation layer that cause the problem.

Mime
View raw message