I read the stack-trace and found that the error comes from oracle.jbo.EntityImpl.lock(). I read that is caused by RowInconsistentException. So the problem is data difference between my database and OAF page.
I put a break-point in the beginning of the method. I saw three interesting child objects: mData, mOrigData and mChanged. I saw that in my case mData content is identical to the database and mOrigData differes. How should I interpret it?
I found that
mDatameans state before OAF operations, andmOrigData- state afterwards.mChangedcontains ids of changed attributes. In my case I already had a non-null value in the database (non-nullinmData) but on the page I was losing that value and tried to putnullinto the database (nullinmOrigData). The framework decided that it was wrong.I also had another case:
updated_atattribute in the database was larger than in themDataobject. It turned out that the database processed the row in the background after 2 seconds, but OAF read the row earlier. When I was trying to commit, OAF found that its state is older in the database and threw the same error.