Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date attribute causing RowInconsistentException: JBO-25014

ILya CycloneAug 20 2014 — edited Nov 6 2014

Hello.

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

upd:

> 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?

This post has been answered by Brunno Dell'Agnolo on Nov 6 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 4 2014
Added on Aug 20 2014
3 comments
1,229 views