Page 1 of 1

how to undo check out the document

PostPosted:Mon Jan 03, 2011 5:38 am
by ssprasad.e
while editing the document i checked out the document but i want to undo the checkout with out uploading edited document.

i mean cancel the check-out.


i getting exception called (Okm-000024:CancelCheckOut)Document lock is denied

please help me.

Re: how to undo check out the document

PostPosted:Mon Jan 03, 2011 8:07 pm
by jllort
I suggest you read user guide http://wiki.openkm.com/index.php/User_Guide

Only user who has made the checkout can cancel it or make a check-in.

Re: how to undo check out the document

PostPosted:Tue Jan 04, 2011 7:42 am
by ssprasad.e
after reading the above information ,

i logged in with admin role and but i could not cancel the check out .i am getting exception like below
1
Code: Select all
2:42:53,578 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:1168)
	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:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
please help me.

Re: how to undo check out the document

PostPosted:Tue Jan 04, 2011 8:15 am
by jllort
You're using version 5.0 no ?
Could you connect as okmAdmin, go to that document, and capture two screenshot ( both with selected document ), one with properties tab visible and the second when you tryed to unlock with the error popup ( if it's possible put too the stack trace error as you've put now ).

Re: how to undo check out the document

PostPosted:Fri Jan 07, 2011 4:45 pm
by geantVert
I have 5.0 release, on Win, and it's not possible to undo checkout from okmAdmin. The option is grayed out. Are there any other steps to do ?

Edit: I had 5.0 beta, then upgraded to final 5.0, maybe that can help ?

Edit2: Workaround found, I went to Repository view on the Admin tab, then went all the way through my document, and then (finally!) "check in" and "Unlock" from the Actions tab! This is *definitely not* a user-friendly way of doing that. Am I missing smtg here ?

Re: how to undo check out the document

PostPosted:Sat Jan 08, 2011 9:42 am
by jllort
I could not understand why you've not enabled cancel checkout in okmAdmin. The user who locks was other than okmAdmin no ? You could try stop jboss, clean tmp and work folders and clean browser cache too.

Re: how to undo check out the document

PostPosted:Mon Jan 10, 2011 6:43 am
by ssprasad.e
i am not able to add screen shots here,error is coming can u people help meout

Re: how to undo check out the document

PostPosted:Mon Jan 10, 2011 6:56 am
by ssprasad.e
to delete the this kid of locks ,what can i do ? is there any why to solve this lock problem using database.
i am using 5.0-RC1.

please help me :cry:

Re: how to undo check out the document

PostPosted:Mon Jan 10, 2011 10:23 am
by geantVert
jllort wrote:I could not understand why you've not enabled cancel checkout in okmAdmin. The user who locks was other than okmAdmin no ? You could try stop jboss, clean tmp and work folders and clean browser cache too.
Yes, the user who locked is *not* okmAdmin, you are right. This user is able to cancel check-out. But me, as okmAdmin, the option is grayed out. However, the workaround that I posted above does work, but this is a very tedious task.

I did remove all the tmp files (the content of server/default/tmp and server/default/work), but that didn't help.

What do you need to know in addition to this ?

Re: how to undo check out the document

PostPosted:Mon Jan 10, 2011 1:35 pm
by ssprasad.e
i am getting exception in the file called DirectDocumentModule.java at contentNode.restore(contentNode.getBaseVersion(), true);

please help me.

Re: how to undo check out the document

PostPosted:Mon Jan 10, 2011 6:43 pm
by pavila
I need a step-by-step guide to reproduce the issue and then I will fix it. For example, in the OpenKM demo can you do this?

Re: how to undo check out the document

PostPosted:Mon Apr 18, 2011 10:31 am
by Luiso
Hello I've created an user:
The user XXX and I put that is adminRole

When I tried to cancel the checkout of other user I can't do with this user (XXX) but if I do with de okmAdmin this work well and I can cancel the checkout.

I tried with the versions 5.0.3 and 5.0.4.

The error is this:
Code: Select all
OKM-002009(Force CancelChekOut): Document access denied
Only administrator use allowed.
I tried to do the same in the demo but I don't have the admin user to try this.

Thanks in advance!

Re: how to undo check out the document

PostPosted:Tue Apr 19, 2011 7:02 pm
by pavila
Did you changed the hibernate.hbm2ddl property from create to none?