Query q = qm.createQuery(
"/jcr:root//element(*,mix:lockable)[@jcr:lockOwner='"
+ session.getUserID() + "']", Query.XPATH);
NodeIterator ni = q.execute().getNodes();
while (ni.hasNext()) {
Node node = ni.nextNode();
String path = node.getPath();
try {
final Lock lock = node.getLock();
if (lock.getLockToken() == null) {
log.debug("Ignoring lock on {} held by {}, not held by this session",