You are viewing limited content. For full access, please sign in.

Question

Question

Document could not be locked for writing. The object has been modified since it was last read. [9047]

asked on January 9, 2020

I tried to OCR a bunch of PDFs in a repository, and some threw the error above.

 

"[Name of document] could not be locked for writing.
 The object has been modified since it was last read. [9047]"

 

When I tried to OCR them again, they generated the searchable text properly. What might have caused that issue so I can possibly avoid it in the future?

0 0

Replies

replied on January 10, 2020

It sounds like another user is modifying the document between the time that you begin extracting text and the time that the client tries to save the text data to the server. The server detects that you are working with an old version, and to prevent data loss it throws this error. The case it's worried about is if that other user also updated the page text you would overwrite their text without ever seeing it. Note though that the check is not that fine-grained, the error is raised when you attempt to lock the document for writing, before the server knows what kinds of changes you are going to make. When you get this error, if you refresh the listing you can check the last modified property of that document to see whose modifications are causing you to get this error.

1 0
replied on January 10, 2020

Hi Brian,

 

I just ran a search in Workflow for one of the documents that threw the error, and sure enough, a workflow ran at the same time trying to assign metadata to the document and reported the entry as locked. This workflow runs on "entry changed" with a few other conditions like "user does not equal workflow." Won't this issue have a chance of happening every single time we try to OCR a document that matches the workflow conditions?

0 0
replied on January 10, 2020

Are you sure this workflow ran first and not as a result of the changes from your second OCR attempt?

0 0
replied on January 10, 2020

I'm not sure exactly when I tried to OCR the first time on the document, but the workflow history for that document shows that it ran the workflow on it 7 times in 3 minutes, including 3 instances kicked off at the same time.

0 0
replied on January 10, 2020

If the workflow reported the document as locked then that workflow was not able to modify the metadata and could not have been the cause of the error you saw. But in general, it's definitely possible for workflow to be the user that is modifying the document and setting the scenario for the error you have seen. You'll want to design your workflows to not compete with your users to modify documents. So if your process has users extracting pages or making another modification at a particular step in the document lifecycle, you don't want automated processes interfering with that.

0 0
replied on January 9, 2020

Hi Brian,

 

I would be looking at event viewer to see if there is any additional information logged to determine the root cause. The event viewer logs have always helped me out when I would get random error messages like the above. 

 

Thank you

Ziad

0 0
replied on January 10, 2020

Hi Ziad,

 

The only error messages I can see around the time I was OCRing are from when I signed on, not when I actually OCRed the documents. They are the error messages you get when you RDP into a server and it tries to connect to your local printers (for example: Driver Adobe PDF Converter required for printer Adobe PDF is unknown. Contact the administrator to install the driver before you log in again.) There are no error messages when I actually performed the OCR.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.