Daily Archives Tuesday, July 2008

!$title$!

!$text$!

!$title$!

!$text$!

Advanced Oracle Troubleshooting Guide, Part 8: Even more detailed latch troubleshooting using LatchProfX

In my last AOT post I published my LatchProf script which is able to sample detailed latchholder data from V$LATCHHOLDER.
Latchprof allows you to drill down into your latching problems at session level (which V$LATCH, V$LATCH_PARENT and V$LATCH_CHILDREN can’t do). It allows you to get valuable details about individual sessions who are holding a latch the [...]

ADF BC: EO/VO create() state + JBO-25030 revisited

Recently I blogged about why you might receive JBO-25030: Failed to find or invalidate owning entity in ADF BC, a follow up to a further description by Steve Muench.

I’d like to blog about another reason you’ll receive JBO-25030 and is related to my recent post on ADF BC: EO/VO initial state post create() explained.

In that blog post it details that an EO/VO that is instantiated and attributes are defaulted via declarative default settings or your own programmatic code, the record’s status is set to STATUS_NEW, but the ADFm binding layer overrides this with STATUS_INITIALIZED. This status implies the record is not a candidate to be inserted into the database until the user or calling program changes another value in the record or programmatically changes the status of the record to STATUS_NEW.

This behaviour has further implications for EOs involved in Associations, more commonly known as foreign key or master-detail relationships, and Composition Associations in particular.

In the case of a master-detail EO Association that is not marked as a Composition Association, on the programmer creating the master entity which has its values defaulted (status STATUS_INITIALIZED), and creating a child entity which the user then sets some of the attributes manually (status STATUS_NEW), on pressing commit the programmer may be surprised to receive a foreign-key constraint error returned from the database. This occurs because the master EO status STATUS_INITIALIZED marks it not as a candidate to insert into the database, but the user setting the child EOs attributes does mark it as a candidate for the database with status STATUS_NEW. As such at commit time, the ADF BC mid-tier searches the EO cache looking for records with status STATUS_NEW (and STATUS_MODIFIED to be strictly true, but not considered here), discards the parent record because it has the wrong status, but sends the insert DML to the database for the child record, raising the FK error.

In the case of a master-detail EO Composition Association, on the programmer creating the defaulted parent EO, creating the child EO and manually setting values, and finally pressing commit, this time the programmer will hit “JBO-25030: Failed to find or invalidate owning entity”. Why? As you know a Composition Association says that a child can’t exist without a parent. So in this case the ADF BC mid-tier is enforcing that the child cannot be inserted into the database with a parent whose status is STATUS_INITIALIZED, because the parent is not a candidate for the database. In other words the mid-tier is enforcing a mandatory FK relationship, with unfortunately a some-what obscure error message.

As detailed in my previous post, you can override the default behaviour of the parent VO such that it’s defaulted state will mark it as a candidate to insert into the database.

I’d like to thank Steve Muench for his assistance on the issues behind this blog post.

This post along with other posts describing common JDeveloper error messages are indexed on the Oracle Wiki.

Sorted Hash Clusters - 2

[Back to Part 1]
In the first part of this series, I showed you how a query by hash key against a sorted hash cluster would return the data in an order dictated by the sort key - without showing a sort operation in the execvution plan, even in the absence of an ‘order by’ clause.
The [...]

Big Changes are Afoot

I spent the day today with my AppsLab brethren sequestered like a jury in the Thunderball conference room in sunny Pleasanton, CA. Or maybe it’s Dublin.
Anyway, Paul called us all together to hunker down on some design work. Well, some new design and some redesign.
If you’re interested in the future of the Connect and eventually [...]

Thank You Larry Ellison

LewisC’s An Expert’s Guide To Oracle Technology

Larry Ellison is a technology leader. I think that’s generally accepted. Some people might not like him, but you can’t really deny what he has done with Oracle. Larry apparently has one giant weakness though. He’s way ahead of his time. I ran across this <a href=”http://sunsite.uakom.sk/sunworldonline/swol-