Owning entity?

I create a BC4J project using the wizards, and select a few tables. I create default view objects for a couple of the entity objects, and create one view link between them. When I try to insert a record into any view object (using any client), EntityImpl throws an InvalidOwnerException with the following message:
JBO-25030: Failed to find or invalidate owning entity.
What does it all mean?
null

It seems like, you have a composistion association between two/more entitys in your model. In this case, if you create a detail entity, the framework tries to find out the master side to lock the top-level master. Please see details on this topic in the glossary section of BC4J Tutorial.

Similar Messages

  • Cannot find or invalidate its owning entity.

    hi when i click my createinsert am geting this error cannot find or invalidate its owning entity. am in jdeveloper 11.1.1.6.0
    my log error is
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Detail entity UamOrganisationUser with row key oracle.jbo.Key[null 7601 ] cannot find or invalidate its owning entity.
    oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamOrganisationUser with row key oracle.jbo.Key[null 7601 ] cannot find or invalidate its owning entity.
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2514)
         at oracle.jbo.server.ViewObjectImpl.createRow(ViewObjectImpl.java:11079)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1364)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    this is my association
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
    <!---->
    <Association
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="OrguserlinkOrganisationsFkAssoc"
      Version="11.1.1.61.92"
      InheritPersonalization="true">
      <DesignTime>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <AssociationEnd
        Name="UamOrganisations"
        Cardinality="1"
        Source="true"
        Owner="model.UamOrganisations"
        LockLevel="NONE">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="UamOrganisations"/>
          <Attr Name="_isUpdateable" Value="true"/>
          <Attr Name="_minCardinality" Value="1"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.UamOrganisations.Organisationid"/>
        </AttrArray>
      </AssociationEnd>
      <AssociationEnd
        Name="UamOrganisationUser"
        Cardinality="-1"
        Owner="model.UamOrganisationUser">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="UamOrganisationUser"/>
          <Attr Name="_isUpdateable" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.UamOrganisationUser.Organisationid"/>
        </AttrArray>
      </AssociationEnd>
    </Association>Edited by: adf009 on 2013/03/24 1:12 AM

    this is my association between parent and child
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE Association SYSTEM "jbo_03_01.dtd">
    <!---->
    <Association
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="OrguserlinkOrganisationsFkAssoc"
      Version="11.1.1.61.92"
      InheritPersonalization="true">
      <DesignTime>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <AssociationEnd
        Name="UamOrganisations"
        Cardinality="1"
        Source="true"
        Owner="model.UamOrganisations"
        LockLevel="NONE">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="UamOrganisations"/>
          <Attr Name="_isUpdateable" Value="true"/>
          <Attr Name="_minCardinality" Value="1"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.UamOrganisations.Organisationid"/>
        </AttrArray>
      </AssociationEnd>
      <AssociationEnd
        Name="UamOrganisationUser"
        Cardinality="-1"
        Owner="model.UamOrganisationUser">
        <DesignTime>
          <Attr Name="_aggregation" Value="0"/>
          <Attr Name="_finderName" Value="UamOrganisationUser"/>
          <Attr Name="_isUpdateable" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.UamOrganisationUser.Organisationid"/>
        </AttrArray>
      </AssociationEnd>
    </Association>i try to folow this
    http://tfathy.blogspot.com/2011/04/detail-entity-with-row-key-null-cannot.html
    http://one-size-doesnt-fit-all.blogspot.com/2008/05/jbo-25030-failed-to-find-or-invalidate.html
    Edited by: adf009 on 2013/03/24 1:22 AM

  • Create MasterDetail together - JBO-25030: Failed to find ...owning entity

    Hi All,
    (ADF Faces + BC, jdev 10.1.3 su 5)
    I have a master-detail data entry in one page. The requirement is when I press Create button, I want to create both Master & Detail (composition) rows together.
    Master-Detail has association. Master PK is sequence, detail FK is Number.
    So I code my backing beans :
    public String createMaster_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding =
    bindings.getOperationBinding("Create");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    else
    createDetail();
    return null;
    I get this error :
    1. JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOwnerException, msg=JBO-25030: Failed to find or invalidate owning entity: detail entity SalesorderD, row key oracle.jbo.Key[-5 ].
    2. JBO-25030: Failed to find or invalidate owning entity: detail entity SalesorderD, row key oracle.jbo.Key[-5 ].
    How to solve this problem ?
    Thank you for your help,
    xtanto

    Hi xtanto,
    Perhaps you need to use "CreateInsert" instead of "Create" to create the master record. You can change this simply by editing the pagedef, double-click the "create" binding, and change it to "CreateInsert"
    Hope this helps,
    John

  • Can't Find Owning Entity From Detail Table With 2 Masters

    Hi,
    I've got a master detail table relationship working with association and view link but when I try to do it again with the same detail table but a new master table I am getting the error, JBO-25030: Detail entity RulBAAG with row key oracle.jbo.Key[null 6A ] cannot find or invalidate its owning entity.
    I really don't want to have to create a seperate set of EOs and VOs for this second relationship. Is there something I can do programaticaly to identify which master / detail relationship the CRUD operation is for? Thanks-
    Master1 table: PK and FK, BId
    Master2 table: PK and FK, AgId
    Detail table: PK, BId & AgId

    Gabz,
    I believe you need to create the database foreign key relationship with "cascade on delete" set. Then ensure that your association in BC4J that models this relationship also has the "cascade on delete" property set (it should by default).
    With this set, deleting the master should automatically delete the children.
    Hope this helps,
    -brian
    UIX Team

  • JBO-25030 Failed to find or Invalidate owning Entity

    I've an association between 2 entities.
    In the database I've a delete cascade option set.
    In BC4J the wizard checked the Composition Association option as well as the delete cascade option.
    However executing I get a JBO-25030 error.
    Removing the composition in seems to work.
    Could You explain me what's the problem ?
    TIA
    Tullio

    May be , this is like : parent key not found.
    => you have an new EO instance (which is a child in a master-detail association)
    with a non-existing master key value.
    regards,
    Harm

  • Entity with key cannot be owned by another row

    Hi All,
    I have a master detail relationship between 2 VOs using Entity level association. When I try to create details rows using createAndInitRow(), I am getting below error. The Association has composition association, cascade delete, cascade update key attributes selected
    Entity with key:oracle.jbo.Key[ XXXXXXX ] cannot be owned by another row:oracle.jbo.Key[ XXXXXXX ]
    Code -
    RowSetIterator rsi = (RowSetIterator)((ParentVORowImpl)parentCurrentRow).getChildVO();
    NameValuePairs nvp = null;
    Row row = null;
    for (ExpressionObject obj : objectList) {
    nvp = new NameValuePairs();
    nvp.setAttribute("AAA", "AAA");
    nvp.setAttribute(<Attributes>, <Attribute Values>);
    row = rsi.createAndInitRow(nvp);
    rsi.insertRow(row);
    The moment createAndInitRow is called for first item I get the error and other items does not get associated with parent properly.
    Any clue what wrong am I doing??

    Copying from [http://www.packtpub.com/oracle-application-development-framework-real-world-developers-guide/book|Oracle ADF Real World Developers Guide]
    Creating child rows in composition association
    Creating a new child row is a bit tricky when the master-child entity association
    type is composition. When you mark an association between master and child entity
    objects as composition, the framework takes the necessary steps to ensure that the
    child entity object row does not exist without the master entity row. If you try to
    create a new child row by calling createRow() on the view object, the framework
    will throw the oracle.jbo.InvalidOwnerException: JBO-25030: Failed to
    find or invalidate owning entity exception.
    There are two possible ways to create child entity rows in this case:
    • Find the master row by using findByKey() or calling executeQuery() with
    a proper condition and then get the RowIterator for the child collection
    by accessing the view link accessor attribute. Now you can use the child
    RowIterator to call createRow() for creating the child row. The following
    code snippet illustrates the creation of the child entity row for the
    Country-Location composition association:
    //In application module implementation class
    * This custom method defined in application module
    * creates child location rows for a master
    * country entity through accessor iterator
    public void createChildRowsThruIter() {
    //Find the parent view object
    ViewObject countries = findViewObject("Countries");
    //IN is the Key value for a specific Country row
    Key key = new Key(new Object[] { "IN" });
    //Find the country for 'IN', maxNumOfRows=1
    Row rows[] = countries.findByKey(key, 1);
    //Access the RowIterator for Location
    RowIterator locIter = (RowIterator)rows[0].
    getAttribute("LocationVO");
    //Create and init location row
    Row row = locIter.createRow();
    row.setAttribute("LocationId", 2200);
    row.setAttribute("City", "Bangalore");
    locIter.insertRow(row);
    • Alternatively, you can directly create a new row in the child view object,
    using createAndInitRow() by passing an appropriately constructed instance
    of oracle.jbo.NameValuePairs, which includes the foreign key attribute
    that provides the context for a child row. Here is an example:
    //In application module implementation class
    * This custom method defined in application module
    * creates child location rows for a master
    * country entity using createAndInitRow()
    public void createChildRowsThruNameValuePairs() {
    ViewObject locations = findViewObject("Locations");
    //Initialize Attributes and Values
    String[] attributes = new String[] { "CountryId" };
    Object[] values = new Object[] { "IN" };
    //Pass the foreign key value for Country while
    //initializing new location row
    Row locRow = locations.createAndInitRow(new
    NameValuePairs(attributes, values));
    //Set other attributes
    locRow.setAttribute("LocationId", 2200);
    locRow.setAttribute("City", "Bangalore");
    locations.insertRow(locRow);
    }

  • Very Basic Question about Entity Beans !!!  Need your help.

    Hi,
    I have the following requirement:-
    ==============================
    There is an application A, whose multiple instances can run
    at the same time. There is some data/variable which is to be
    globally shared (i.e by all the instances). I have thought of using
    Entity Beans and putting that data in a single record in DB.
    Approach A:-
    ~~~~~~~~~~~
    Instance 1 of A (with Entity Bean ) -
    -> Database (only 1 row exist)
    Instance 2 of A (with Entity Bean ) -
    Approach B:-
    ~~~~~~~~~~~
    Instance 1 of A
    -> Entity Bean -> Database (only 1 row exist)
    Instance 2 of A
    My Query is:-
    1) In Approach A, both the instances of Application
    have their own Entity Bean (running in same JVM as them,
    packaged with Application)..Now both the entity bean instances
    represent 1 row on Database...At one time only 1 Entity bean
    will be performing the operation (read/write, other will be
    disallowed).
    2) In Approach B, both the instances of application(or Client) using
    the same Entity Bean - which is representing 1 row of Database
    Which is correct....I have read somewhere instance of Entity Bean
    corresponds to 1 row of database....If that is the case, Approach
    A would be wrong..
    Please help.

    1 Entity bean for 1 row is not true. An entity bean can represent data from multiple tables also. The correct statement is 1Entitybean for 1 resultset.
    So in case 1, u have 2 instances of Application running so it should not be an issue.

  • Html entity expansion

    I was given an HTML document that has an XML document embedded in the HEAD. The XML document is escaped with html entities, so instead of angle brackets, you have the entity equivalent which is "ampersand less than semi colon" (if i typed it out literally it would look like an angle bracket here), or "ampersand greather than semi colon"
    Is there a known method for expanding html entities? Or do I need to code up my own entity replacement routine?
    Thanks for any help.

    I really can't imagine why somebody would do that. It just sounds like a loony idea to me. (I mean the part about putting escaped XML documents in the head of an HTML document, not what you propose to do about it.)
    If that's really your requirement, then hopefully the escaped XML is the text inside an element. (In my example, it's the text inside the "head" element except that I put extra whitespace before and after it.) And hopefully the HTML you're getting is actually XHTML, so you could feed it into an XML parser.
    If both of those conditions are true then what you should do is this:
    1. Feed the entire document into an XML parser. Extract the text from the "head" element that's the child of the root "html" element. You could certainly use DOM for that if you wanted. This will be the XML document you're after, and the parser will have unescaped it for you.
    2. Feed that text into another XML parser and proceed with whatever you have to extract from it.
    But based on the looniness of this data format you probably won't have either of those conditions true.
    If the data isn't XHTML then run it through something that cleans it up, JTidy or TagSoup or something like that.
    If the XML document isn't the only text in an element then you'll have to do some string hacking to get rid of the other text.

  • Implementing a Generic UUP Entity Property Manager

    Guys,
    My Environment is Weblogic 9.2.1 running on Solaris using Sun JDK
    1.5.x. What I am trying to accomplish is:
    Create a Entity Property manager that is deployed outside any portal
    application. Later on when portal applications are developed and
    deployed they can configure their applications to use these entity
    property managers along with their own entity property manager. In
    order to do that I need to deploy these entity property managers as
    EJBs outside any application as an EJB modules. Here is my questions:
    1. Can I deploy an Entity Property Manager independently outside any
    portal application in WebLogic Portal 9.2.
    2. If I can How can I configure my applications to use a remote Entity
    Property Manager EJB.
    Thanks.
    James Bond.

    Guys,
    My Environment is Weblogic 9.2.1 running on Solaris using Sun JDK
    1.5.x. What I am trying to accomplish is:
    Create a Entity Property manager that is deployed outside any portal
    application. Later on when portal applications are developed and
    deployed they can configure their applications to use these entity
    property managers along with their own entity property manager. In
    order to do that I need to deploy these entity property managers as
    EJBs outside any application as an EJB modules. Here is my questions:
    1. Can I deploy an Entity Property Manager independently outside any
    portal application in WebLogic Portal 9.2.
    2. If I can How can I configure my applications to use a remote Entity
    Property Manager EJB.
    Thanks.
    James Bond.

  • Create Entity class from view

    Hello,
    Is it possible to use views in java persistence in the same way as tables (but just for fetching data)?
    Thanks in advance.

    hi,
    before doing this first consider the runtime usage of your appln. Will there be 2 separate appln modules that has its own entity objects..?
    creating 2 connections doesnt means that your eos will be used together?
    best is to make a single connection to a schema that has access to all tables of both the schema, with proper rights. next you create synonyms with proper access name i.e sch-name.tbl-name
    or else you can directly create entity object by this pattern. Right click the model project or any package in it and select create new eo from busniess components menu.
    Regards,

  • Detail entity with row key null cannot find or invalidate it

    hi am trying to insert parent table values and child table values same time in same view,am in jdeveloper 11.1.1.6.0 am geting this error
    the error happen when i click createinsert ,am doing this in testmodel
    93] executeQueryForCollection ViewObject:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1, RowSet:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [94] _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1>#q computed SQLStmtBufLen: 137, actual=110, storing=140
    [95] SELECT LutProfcategory.PROFCATCODE,         LutProfcategory.PROFCATEGORY FROM LUT_PROFCATEGORY LutProfcategory
    [96] ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1 Created new QUERY statement
    [97] Bind params for ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1
    [98] For RowSet : _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [99] Passing to detail entity.create: CadaccUserFkAssoc.UamCadastreaccounts = oracle.jbo.Key[11309 ]
    [100] OracleSQLBuilder Executing doEntitySelect on: LUT_COUNTRY (false)
    [101] Built select: 'SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry'
    [102] Executing FAULT-IN...SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry WHERE COUNTRYCODE=:1
    Exception in thread "AWT-EventQueue-0" oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamUserdetails with row key null cannot find or invalidate its owning entity.
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at model.Entity.UamUserdetailsImpl.create(UamUserdetailsImpl.java:913)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2498)
         at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11042)
         at oracle.jbo.jbotester.NavigationBar.doInsertAction(NavigationBar.java:136)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:109)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Edited by: adf009 on 2013/04/19 1:23 PM
    Edited by: adf009 on 2013/04/19 1:24 PM

    Hi,
    I assume this is a child entity in a composition association. So when you create the rows for the child entity do you populate the parent's reference key ?
    You can use NameValuePairs
    NameValuePairs nvps=new NameValuePairs();
    nvps.setAttribute("ForeignKeyReference", value);
    createAndInitRow(nvps);
    Regards,
    Ramandeep

  • Is it possible to create Detail entity row before Master entity row?

    Hi All,
    I have a Master - Detail relationship. When I insert a row into the detail entity, I need to create a corresponding master record. Is this even possible? I've been fiddling with different association relationships, this.setNewRowState() commands, etc. for the past 12 hours and haven't made much progress. I came across this: http://adfjsf.blogspot.com/2010/12/row-statusinitialized-and-statusnew.html which gives me hope, but I can't for the life of me figure it out.
    Basically, I'm trying to override the Detail entity's create method with the following:
        RowSet addressId = (RowSet)this.getDocAddresses();
        NameValuePairs nvp = new NameValuePairs();
        Row row = addressId.createAndInitRow(nvp);
        row.setNewRowState(STATUS_INITIALIZED);
        addressId.insertRow(row);I get a "Detail entity Quotes with row key [null] cannot find or invalidate its owning entity" error. If I take off the composition association, I get an error saying the Qutoes row cannot be created.
    If you want to checkout my use case, you can do so here: How to create a master entity record from the detail entity.
    Any ideas?
    Will

    Here's another use case.
    In accounting software, documents such as Invoices and Deliveries create financial transactions. So say we have three tables: Deliveries, Invoices, Transactions. In the database, Transactions needs to be a Master table, Deliveries and Invoices the Detail table. This means that Deliveries and Invoices must have an associated financial transaction. To switch the dependencies around the other way (Order/Deliveries be the Master, Transactions the Detail) wouldn't work due to the foreign key dependencies i.e. The same transaction would have to be a child of both Orders and Deliveries, which would be incorrect.
    However, in the JDeveloper application an Invoice row (the Detail) would need to be created first, and then the Transaction (Master) would be created second. This seems like a logic sequence best created at the entity level. When I try to accomplish this, I get a row null or row cannot be created error. This is leading me to believe that in the JDev application, I will need to "lie" and reverse the association, putting the Delivery/Invoice as the Master and the Transaction as the detail.
    Is this the best way to go about solving this problem? I don't like putting in associations that don't match the database structure, but if I can't create a Master entity row from a Detail entity, it's looking like that's my best route.
    Will

  • Defaulting logic in entity create method

    Hi
    As suggested by BC4J I use the create method of my entity object to insert defaulting logic for some attributes. The code looks like this:
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    Number seqNumber = new Number();
    SequenceImpl s = new SequenceImpl("REV_SEQ", getDBTransaction());
    seqNumber = s.getSequenceNumber();
    setRevId(seqNumber);
    setCreationDate(SamUtils.getSystemDate());
    ApplicationModule am = getDBTransaction().getRootApplicationModule();
    if (am instanceof SecuredApplicationModule)
    setUsrId(((MyApplicationModule) am).getUsrId());
    But executing this code results in an Exception: "JBO-25014: Other User has changed the Row". If I remove the code between the lines above everything works ok.
    My questions are:
    - Is it ok to use set-Methods in the entity create method? Or should I set my default values to the "attributeList" instead?
    - do you think it is a problem to use the ApplicationModule as shown? I should mention that am.getUsrId() simply returns a previously stored variable and does not perform any queries or alike.
    Thanks for your help
    Frank Brandstetter

    It's definitely fine to setAttributes - I've done it myself (but not using "specific" setters).
    I haven't used the built-insequences before - this bit of your code looks a bit wasteful in terms of object creation, but that's obviously not your issue....
    It looks fine to use an application module in such a way; I coded a "current user id" function on mine too.
    I actually suspect the date-attribute, since I (me again!) had some "concurrent user" problems too. The issue was the fact that a Java date is accurate to the millisecond, and the database storage and retrieval wasn't. (I wasn't using Oracle so I'm not sure how it goes there....) A "concurrent user" exception gets thrown when bc4j goes to update an entity and finds that the date-value in the object doesn't match the "rounded" one it retrieves (as a check, just before it does the update - this is the optimistic locking) from the database. [So does the error occur only when you've saved the new entity once, then update it and try to save it again?]
    I got around it by setting the millisecond portion of any dates I used to zero (since the "storage" was accurate to a second) - so you might try that. (Did it generically in prepareForDML in my own Entity superclass, I think.)
    Otherwise, try setting the attribute, but not in the create method, and seeing if you get the same problem...
    HTH
    Mike.

  • AutoVue API - Create custom entity

    All,
    Is it possible to extend the AutoVue API to create your own markup entity.
    We have been asked to create a button that will allow them to create their own entity which would basically be a compilation of existing entities (dashed and solid lines with arrow heads) but grouped together to form one entity.
    We would like to be able to create more than one of these entities too so the group functionality may not help us a great deal here either as it seems to only allow one group of entities. If i try to group another then my first grouping gets undone.
    Normally when you select an entity button to draw it, you then hold the left click button and drag across the UI and then let the mouse button go (to complete a line).
    We do not have to be able to do this, they could just click a point on the UI and the new entity be created at the point and then allow them to re-size it.
    I thought there was documentation to do such a thing but i am unable to locate it if it does exist.
    Any help on this would be appreciated as it is not just one custom entity they want and it will also help us in the future to sell AutoVue especially if we can prove such custom things. It also makes it harder to move to another viewer if they come to rely on such custom components.
    Nick

    - The custom markup entity (e.g. UDEPolygon) should implement the UDEDesigner interface and the custom markup entity spec. should extends UDESpec class.
    - Register the UDE designer (MarkupBean mrkBean): mrkBean.registerUdeDesigner()
    * Register a UDEDesigner class.
    * @param udename The UDE name. Should match string returned by
    * UDEDesigner.getName().
    * @param classname The fully qualified classname of the UDEDesigner.
    public void registerUdeDesigner(String udename, String classname)
    - Register your mouse listener to capture and convert to world coordinates mouse point (mrkBean.deviceToWorld(pt))
    - Set the custom markup entity class and enter markup ADD mode:
    mrkBean.selectionClear();
    mrkBean.setMarkupEntityClass("UDEPolygon"); // UDEpolygon is your custom markup entity class name
    mrkBean.setActionMode(MarkupBean.ACTION_MODE_ADD);

  • Help with Detail entity Insert with row key null cannot find or invalidate

    Hi,
    My Problem:
    I have created a form in JDeveloper ADF. This form is based on the Table Name IT_HARDWARE. The IT_HARDWARE keep track of all the hardware and it is in the relationship with the IT_SYSTEM table, IT_LOCATION, EMPOYEES. So the IT_HARDWARE has a FOREIGN KEY from IT_SYSTEM (SYS_ID), IT_LOCATION (LOC#), EMPLOYEE (EIP#).
    When I create a form to insert data into this form, I receive message "Detail entity ItHardwareInsert with row key null cannot find or invalidate its owning entity."
    I tried all possible to understand what is causing this and I can't find it. Can someone help me?

    Than you for the link, I appreciate it. I kind understand the root of the problem, but since I am new to JDeveloper, I am getting trouble to solve the problem. I am going to read and understand what is going on. Thank you for the link.

Maybe you are looking for