3 Replies Latest reply: Nov 6, 2014 1:20 PM by Brunno Dell'Agnolo RSS

    Date attribute causing RowInconsistentException: JBO-25014

    ILya Cyclone


      Seems like I managed to track down random RowInconsistentException happening in my simple application after creating a row and trying to modify it afterwards.

      Thanks to this blog post: http://huysmansitt.blogspot.ch/2013/05/adf-bc-jbo-25014-another-user-has.html


      That's what I found in debug mode on commit:

      <oracle.adf.model> <OracleSQLBuilderImpl> <doEntitySelectForAltKey> <[3344] Executing LOCK...SELECT ... WHERE ID_APP_USER=:1 FOR UPDATE NOWAIT>

      <oracle.adf.model> <OracleSQLBuilderImpl> <bindWhereAttrValue> <[3345] Where binding param 1: 1030>

      <oracle.adf.model> <EntityImpl> <compare> <[3346] Entity compare failed for attribute DStart>

      <oracle.adf.model> <EntityImpl> <compare> <[3347] Original value :2014-08-19 19:09:13.144>

      <oracle.adf.model> <EntityImpl> <compare> <[3348] Target value :2014-08-19 19:09:13.0>


      <oracle.adf.model> <DCBindingContainer> <reportException> <[3361] oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[1030 ].


      DStart is timestamp attribute in my entity with adf.currentDateTime default value.

      Now please correct me if I'm wrong: adf.currentDateTime value contains milliseconds and stores it in entity cache, but database DATE attribute format doesn't accept miliseconds and stores 0 instead of real miliseconds value - which is causing failure in comparison as Entity cache is sure that milliseconds = 144.

      I'm the only user and PL triggers shouldn't do anything in this case.


      If I'm correct, what would the proper solution for this? Set entity attribute format to "yyyy-MM-dd hh24:mi:ss"? Set Refresh on insert on this attribute? Or some other?


      Thank you.

      ADF 12.1.3



      > Set entity attribute format to "yyyy-MM-dd hh24:mi:ss"?

      Tried this, but didn't work. Why does it still stores milliseconds while it isn't in format?


      >Set Refresh on insert on this attribute?

      Works. Is it the best solution?