You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Chris Greene <cs...@gmail.com> on 2005/09/07 16:17:41 UTC

Ver 2.1 problem with Unlock

Folks,

I appreciate any help you might offer, thanks.

The second request for UNLOCK fails in ver 2.1 but not in ver 2.0.

(All of the wd methods are wrapper methods using Slide webdavresource methods.
We're using the Xythos webdav server.)

Here are the log entries...
com.idc.cms.WebdavClient     - UNLOCK FAILURE: OK (200) code: 200      
checkin_process.jsp     - Finish Task - Unlock Failed!!           
checkin_process.jsp     - Finish Task - Lock state isLocked: true 


if (wd.isLocked(xythosFolder + fileName)) {
	tempIsFileLocked = true;

	if (wd.unLock(xythosFolder + fileName)) {
		logger.debug("Put file - Unlock Succeeded");
	} else {
		logger.debug("Put file - Unlock Failed!!");
	}

} else {
	tempIsFileLocked = false;
}

// Retrieve the file contents and upload to Xythos
// -----------------------------------------------
InputStream inStream = fi.getInputStream();

if (!(wd.putFileFromInputStream( xythosFolder + fileName, inStream ))) {
	isError = true;
	throw new RuntimeException("Unable to store " + xythosFolder +
fileName + " in Xythos." );
} else {
	if (tempIsFileLocked == true) {
		tempIsFileLocked = false;
		if (!(wd.setLock(xythosFolder + fileName, cnfg.getXythosUsername(),
CmsConst.DEFAULT_LOCK_DURATION))) {
			logger.warn("Lock failed on: " + xythosFolder + fileName);
		}
	}
}

//Later in the code - HERE IS WHERE THE LOCK FAILS
if (wd.unLock(xythosFolder + fileName)) {
	logger.debug("Finish Task - Unlock Succeeded");
} else {
	logger.debug("Finish Task - Unlock Failed!!");
}
logger.debug("Finish Task - Lock state isLocked: " +
wd.isLocked(xythosFolder + fileName));

Here are the log entries...
com.idc.cms.WebdavClient     - UNLOCK FAILURE: OK (200) code: 200      
checkin_process.jsp     - Finish Task - Unlock Failed!!           
checkin_process.jsp     - Finish Task - Lock state isLocked: true

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org