• es.git.openkm.core.LockException: Node locked.

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #6592  by El_Caballero
 
To find the locktoken of a file, you can run it directly in the run-script section. For example:
Code: Select all
es.git.openkm.util.JCRUtils.getLockToken("93578f93-0bf7-493c-9fea-a9e75e4ea775");
It will give you the locktoken of the file with uuid "93578f93-0bf7-493c-9fea-a9e75e4ea775".
Another tip: When you are editing the okm:lockTokens, separate it with commas ( like "," ), iif you have severals lockTokens :D

Regarts

I guess that we can add the lockTokens with script too.
 #9320  by nils petersohn
 
hello,

i am having problems with this also in version 5.0.2. build 4894
everything i do below is with the user okmAdmin, which is the only user in my fresh install.

the case is that i somehow checked out a file and like to cancel the checkout.
i also played with webdav a lot. but i think that is not important here in this case or is it?

i am getting an exception not on line 180 like in the first post but on line 189 now:
Code: Select all
05:46:22,327 ERROR [DirectDocumentModule] Node locked.
javax.jcr.lock.LockException: Node locked.
	at org.apache.jackrabbit.core.lock.XALockManager.checkLock(XALockManager.java:189)
	at org.apache.jackrabbit.core.ItemValidator.checkLock(ItemValidator.java:389)
	at org.apache.jackrabbit.core.ItemValidator.checkCondition(ItemValidator.java:312)
	at org.apache.jackrabbit.core.ItemValidator.checkModify(ItemValidator.java:274)
	at org.apache.jackrabbit.core.NodeImpl.restore(NodeImpl.java:3607)
	at com.openkm.module.direct.DirectDocumentModule.cancelCheckout(DirectDocumentModule.java:1025)
	at com.openkm.api.OKMDocument.cancelCheckout(OKMDocument.java:169)
	at com.openkm.frontend.server.OKMDocumentServlet.cancelCheckout(OKMDocumentServlet.java:234)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
...
The next steps i did were: select the file in the repository view. (see attachment)
when i click on unlock at the top (next to "remove current") the following exception occurs:
Code: Select all
06:03:05,364 ERROR [RepositoryViewServlet] Node not locked by session: node /okm:root/Ihre Belegnummer_ 199016311658.eml
javax.jcr.lock.LockException: Node not locked by session: node /okm:root/Ihre Belegnummer_ 199016311658.eml
	at org.apache.jackrabbit.core.lock.SessionLockManager.unlock(SessionLockManager.java:183)
	at org.apache.jackrabbit.core.NodeImpl.unlock(NodeImpl.java:4680)
	at com.openkm.servlet.admin.RepositoryViewServlet.unlock(RepositoryViewServlet.java:153)
	at com.openkm.servlet.admin.RepositoryViewServlet.doGet(RepositoryViewServlet.java:96)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...
i am not able to unlock the file with the information of the previous posts.
what is the architecture of the locking mechanism? how can i reset the locking state for a file?
Attachments
repository view of the file which has a damaged lock
repository view of the file which has a damaged lock
Screen shot 2011-03-06 at 12.13.17 PM.png (12.58 KiB) Viewed 6966 times
javax.jcr.lock.LockException
javax.jcr.lock.LockException
Screen shot 2011-03-06 at 12.11.12 PM.png (84.53 KiB) Viewed 6966 times
 #9345  by pavila
 
If a node was locked in WebDAV it can't be unlocked easilly. Some WebDAV clients are buggy with locks and may cause problems. Anyway, as I can see in the screenshot the lockOwner is okmAdmin so should be able to make the unlock. Please, run the SQL sentence:
Code: Select all
SELECT * FROM OKM_LOCK_TOKEN;
And tell me the results.
 #9360  by nils petersohn
 
i am not really sure how to get to the database.
i tried the admistration sql shell with no results: this means there is no entry in the table.
Attachments
Screen shot 2011-03-08 at 12.20.05 AM.png
Screen shot 2011-03-08 at 12.20.05 AM.png (52.83 KiB) Viewed 6962 times
 #9867  by jojo1976
 
Hi,

I have this problem just now....
I was editing with Open Office Addon with an empty new installation to try this extension.

Nom i'm afraid, i tried to unlock the file and I can't.... in a real enviroment this would be a problem.....
 #9887  by pavila
 
This issue is supposed to be fixed in OpenKM 5.0.3, so please, can you confirm which have you installed? Also would help the steps to reproduce the issue.
 #9899  by jojo1976
 
Ops.....
I was trying to reproduce the problem and finally got it.
The fault was totally mine ... The problem was that I closed the service with blocked documents and I had hibernate.dialect.HSQLDialect to create..... :oops:
I've done a lot of testing and everything works fine.
Sorry for the inconvenience :roll: :shock: :(
 #10836  by roycal93
 
Hi people,

I have the same problem, can't make checkin - cancel checkout to a document that is locked by my user (OpenKM gives me the error Node Locked). According to what I read it happens because I'm trying to make something using a different token.

I know the best way to do it is by getting the token associated to my user and use it for the checkin-cancel checkout processes. But honestly I don't know where do you get this method: SessionManager sessions = SessionManager.getInstance();
String oldToken = sessions.getTokenByUserId(session.getUserID());

getTokenByUserId is the one I exactly need but I think it is not part of any web service I had used.

Please let me know if that method is available for openkm or I have to implement it on my project. (I am using c#)

Best regards,

RC.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.