9 Replies Latest reply: Feb 19, 2013 5:50 AM by Tshifhiwa RSS

    JBO-25013: Too many objects match the primary key oracle.jbo.Key

    Tshifhiwa
      hi am adding values from one viewObject to another viewObject am geting this error JBO-25013: Too many objects match the primary key oracle.jbo.Key
      i used this code
      <af:commandButton text="Add New" id="cb5"
                                              actionListener="#{pageFlowScope.addMember.addMember}"/>
      
          RichTable empTable;
           public void setEmpTable(RichTable empTable) {
               this.empTable = empTable;
           }
      
      
           public RichTable getEmpTable() {
               return empTable;
           }
      
       binding="#{pageFlowScope.addMember.empTable}">
      
      the error is pointing in this line
      
          public void addMember(javax.faces.event.ActionEvent actionEvent) {
              List<String> tempTable = new ArrayList<String>();
              //Code to get the bindings for TargetVO :
                   RowKeySet selectedEmps = getEmpTable().getSelectedRowKeys();    
                     Iterator selectedEmpIter = selectedEmps.iterator();
                     DCBindingContainer bindings =
                                       (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                     DCIteratorBinding empIter = bindings.findIteratorBinding("UserDetailsViewVO1Iterator");
                     RowSetIterator empRSIter = empIter.getRowSetIterator();
                      while(selectedEmpIter.hasNext()){
                        Key key = (Key)((List)selectedEmpIter.next()).get(0);
                        Row currentRow = empRSIter.getRow(key);
                           onRowCreate(currentRow);
                      }
                   
      
          }
          public void onRowCreate( Row currentRow ) {
              OIDOperations   oIDOperations= new  OIDOperations();
              Map<Object,String> mp=new HashMap<Object, String>();          
           BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
           //access the name of the iterator the table is bound to. 
           DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("DeltMember1Iterator");
           //access the underlying RowSetIterator
           RowSetIterator rsi = dciter.getRowSetIterator();
           //get handle to the last row
           Row lastRow = rsi.last();
           //obtain the index of the last row
           int lastRowIndex = rsi.getRangeIndexOf(lastRow);
             
         
           //create a new row
         
        
           
           Row newRow = rsi.createRow();
           String f = (String)currentRow.getAttribute("Firstname");
           String s = (String)currentRow.getAttribute("Surname");
           String u = (String)currentRow.getAttribute("Username");  
           String n = (String)currentRow.getAttribute("Emailaddress");
           
              newRow.setAttribute("Firstname", f);
              newRow.setAttribute("Surname", s);
              newRow.setAttribute("Username1", u);
              newRow.setAttribute("Username", u);
              newRow.setAttribute("Emailaddress", n);
              newRow.setAttribute("Organisationid1",getorgid());
           
           //initialize the row
           newRow.setNewRowState(Row.STATUS_INITIALIZED);
           //add row to last index + 1 so it becomes last in the range set
           rsi.insertRowAtRangeIndex(lastRowIndex +1,  newRow); 
           //make row the current row so it is displayed correctly
           rsi.setCurrentRow(newRow);    
              System.out.println("Username " + u);
              System.out.println("firstname " + f);
              System.out.println("surname " + s);
              System.out.println("email " + n);
             
      
      
          }
      Edited by: adf009 on 2013/02/14 2:44 PM

      Edited by: adf009 on 2013/02/14 2:44 PM

      Edited by: adf009 on 2013/02/14 2:46 PM

      Edited by: adf009 on 2013/02/14 2:47 PM
        • 1. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
          izzzooo
          Hi,
          Too many objects match the primary key oracle.jbo.Key is a general error.It occurs when pk save,delete...operations.
          When you inserting your row please control your pk correct and pk type at entity object not bigInteger etc...
          If you want to just insert row don't use rsi.getRangeIndexOf it is not necessary i think.
          • 2. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
            Tshifhiwa
            how must i control my pk
            my log error is
            
            Caused by: oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[2909 ].
                 at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:604)
                 at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:613)
                 at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1020)
                 at oracle.jbo.server.EntityCache.add(EntityCache.java:537)
                 at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1207)
                 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 uam.cadastre.gov.za.OrgDetails.onRowCreate(OrgDetails.java:1650)
                 at uam.cadastre.gov.za.OrgDetails.addMember(OrgDetails.java:1624)
                 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)
                 ... 49 more
            <DCUtil> <findSpelObject> [3498] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for uam_view_pageDefs_OrgDetailsPageDef_WEB_INF_Updatetaskflow_definition_xml_Updatetaskflow_definition
            <DCIteratorBinding> <releaseDataInternal> [3499] Releasing iterator binding:OfficecodeList_436
            <DCIteratorBinding> <releaseDataInternal> [3500] Releasing iterator binding:OrganisationtypecodeList_344
            <DCIteratorBinding> <releaseDataInternal> [3501] Releasing iterator binding:OrgsubtypecodeList_437
            <DCIteratorBinding> <releaseDataInternal> [3502] Releasing iterator binding:CountrycodeList_438
            <DCIteratorBinding> <releaseDataInternal> [3503] Releasing iterator binding:ProvinceList_439
            <DCIteratorBinding> <releaseDataInternal> [3504] Releasing iterator binding:CityList_440
            <DCIteratorBinding> <releaseDataInternal> [3505] Releasing iterator binding:SuburbList_441
            <JUCtrlHierNodeBinding> <release> [3506] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_45, value:UpdResPerson1Iterator
            <JUCtrlHierNodeBinding> <release> [3507] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_46, value:UpdResPerson1Iterator
            <JUCtrlHierNodeBinding> <release> [3508] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_90, value:UserDetailsViewVO1Iterator
            <JUCtrlHierNodeBinding> <release> [3509] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_203, value:DeltMember1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3510] Releasing iterator binding:UpdUamOrganisation1Iterator
            <JUCtrlHierNodeBinding> <release> [3511] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_45, value:UpdResPerson1Iterator
            <JUCtrlHierNodeBinding> <release> [3512] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_46, value:UpdResPerson1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3513] Releasing iterator binding:UpdResPerson1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3514] Releasing iterator binding:UpdPaymentOptions1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3515] Releasing iterator binding:LutPaymentmethodsView1Iterator
            <JUCtrlHierNodeBinding> <release> [3516] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_203, value:DeltMember1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3517] Releasing iterator binding:DeltMember1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3518] Releasing iterator binding:UamUserdetailsView1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3519] Releasing iterator binding:UpdOrganisationUser1Iterator
            <JUCtrlHierNodeBinding> <release> [3520] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_90, value:UserDetailsViewVO1Iterator
            <DCIteratorBinding> <releaseDataInternal> [3521] Releasing iterator binding:UserDetailsViewVO1Iterator
            <JUCtrlHierNodeBinding> <release> [3522] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_87, value:vcRowsIterator
            <DCIteratorBinding> <releaseDataInternal> [3523] Releasing iterator binding:operators_357
            <DCIteratorBinding> <releaseDataInternal> [3524] Releasing iterator binding:listIter
            <DCIteratorBinding> <releaseDataInternal> [3525] Releasing iterator binding:values_360
            <DCIteratorBinding> <releaseDataInternal> [3526] Releasing iterator binding:values_360
            <DCIteratorBinding> <releaseDataInternal> [3527] Releasing iterator binding:nestedViewCriteria_362
            <DCIteratorBinding> <releaseDataInternal> [3528] Releasing iterator binding:nestedViewCriteria_362
            <DCIteratorBinding> <releaseDataInternal> [3529] Releasing iterator binding:operators_357
            <DCIteratorBinding> <releaseDataInternal> [3530] Releasing iterator binding:operators_364
            <DCIteratorBinding> <releaseDataInternal> [3531] Releasing iterator binding:listIter
            <DCIteratorBinding> <releaseDataInternal> [3532] Releasing iterator binding:values_367
            <DCIteratorBinding> <releaseDataInternal> [3533] Releasing iterator binding:values_367
            <DCIteratorBinding> <releaseDataInternal> [3534] Releasing iterator binding:nestedViewCriteria_369
            <DCIteratorBinding> <releaseDataInternal> [3535] Releasing iterator binding:nestedViewCriteria_369
            <DCIteratorBinding> <releaseDataInternal> [3536] Releasing iterator binding:operators_364
            <DCIteratorBinding> <releaseDataInternal> [3537] Releasing iterator binding:operators_371
            <DCIteratorBinding> <releaseDataInternal> [3538] Releasing iterator binding:listIter
            <DCIteratorBinding> <releaseDataInternal> [3539] Releasing iterator binding:values_374
            <DCIteratorBinding> <releaseDataInternal> [3540] Releasing iterator binding:values_374
            <DCIteratorBinding> <releaseDataInternal> [3541] Releasing iterator binding:nestedViewCriteria_376
            <DCIteratorBinding> <releaseDataInternal> [3542] Releasing iterator binding:nestedViewCriteria_376
            <DCIteratorBinding> <releaseDataInternal> [3543] Releasing iterator binding:operators_371
            <DCIteratorBinding> <releaseDataInternal> [3544] Releasing iterator binding:operators_378
            <DCIteratorBinding> <releaseDataInternal> [3545] Releasing iterator binding:listIter
            <DCIteratorBinding> <releaseDataInternal> [3546] Releasing iterator binding:values_381
            <DCIteratorBinding> <releaseDataInternal> [3547] Releasing iterator binding:values_381
            <DCIteratorBinding> <releaseDataInternal> [3548] Releasing iterator binding:nestedViewCriteria_383
            <DCIteratorBinding> <releaseDataInternal> [3549] Releasing iterator binding:nestedViewCriteria_383
            <DCIteratorBinding> <releaseDataInternal> [3550] Releasing iterator binding:operators_378
            <DCIteratorBinding> <releaseDataInternal> [3551] Releasing iterator binding:criteriaItemsForSearch_348
            <DCIteratorBinding> <releaseDataInternal> [3552] Releasing iterator binding:viewObjectBindVars_351
            <DCIteratorBinding> <releaseDataInternal> [3553] Releasing iterator binding:viewObjectBindVars_351
            <DCIteratorBinding> <releaseDataInternal> [3554] Releasing iterator binding:properties_353
            <DCIteratorBinding> <releaseDataInternal> [3555] Releasing iterator binding:properties_353
            <DCIteratorBinding> <releaseDataInternal> [3556] Releasing iterator binding:criteriaItemsForSearch_348
            <JUCtrlHierNodeBinding> <release> [3557] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_88, value:vcRowsIterator
            <JUCtrlHierNodeBinding> <release> [3558] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_87, value:vcRowsIterator
            <JUCtrlHierNodeBinding> <release> [3559] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_88, value:vcRowsIterator
            <DCIteratorBinding> <releaseDataInternal> [3560] Releasing iterator binding:vcRowsIterator
            <DCIteratorBinding> <releaseDataInternal> [3561] Releasing iterator binding:variableIterator
            <DCIteratorBinding> <releaseDataInternal> [3562] Releasing iterator binding:UamAddress1Iterator
            <ApplicationPoolMessageHandler> <doPoolMessage> [3563] **** PoolMessage REQ ATTACH LWS
            <ApplicationPoolMessageHandler> <doPoolMessage> [3564] **** PoolMessage REQ DETACH LWS
            <ViewObjectImpl> <closeStatementsResetRowSet> [3565] ViewObject: [internal_vcival_def]Root.internal_vcival_def_385 close prepared statements...
            <ViewObjectImpl> <closeStatementsResetRowSet> [3566] ViewObject: [internal_vco_def]Root.internal_vco_def_442 close prepared statements...
            <ViewObjectImpl> <closeStatementsResetRowSet> [3567] ViewObject: [internal_vci_def]Root.internal_vci_def_355 close prepared statements...
            <ViewObjectImpl> <closeStatementsResetRowSet> [3568] ViewObject: [AppModule.UserDetailsViewVO1.data_uam_view_updateorgPageDef_Updatetaskflowdefinition1_uam_view_pageDefs_OrgDetailsPageDef_WEB_INF_Updatetaskflow_definition_xml_Updatetaskflow_definition_ImplicitViewCriteriaQuery]Root.AppModule_UserDetailsViewVO1_data_uam_view_updateorgPageDef_Updatetaskflowdefinition1_uam_view_pageDefs_OrgDetailsPageDef_WEB_INF_Updatetaskflow_definition_xml_Updatetaskflow_definition_ImplicitViewCriteriaQuery_346 close prepared statements...
            <DCUtil> <findSpelObject> [3569] DCUtil, returning:oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding, for ImplicitViewCriteriaQuery
            <JUCtrlHierNodeBinding> <release> [3570] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_87, value:vcRowsIterator
            <JUCtrlHierNodeBinding> <release> [3571] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_88, value:vcRowsIterator
            <JUCtrlHierNodeBinding> <release> [3572] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_87, value:vcRowsIterator
            <JUCtrlHierNodeBinding> <release> [3573] released: ROOT node binding:noCtrl_oracle_adfinternal_view_faces_model_binding_FacesCtrlHierNodeBinding_88, value:vcRowsIterator
            <DCIteratorBinding> <releaseDataInternal> [3574] Releasing iterator binding:vcRowsIterator
            <DCIteratorBinding> <releaseDataInternal> [3575] Releasing iterator binding:variableIterator
            <ADFLogger> <begin> Rollback transaction
            <ApplicationModuleImpl> <resetState> [3576] Resetting AM=Root
            <ApplicationPoolMessageHandler> <doPoolMessage> [3577] **** PoolMessage REQ DETACH LWS
            <ApplicationPoolMessageHandler> <doPoolMessage> [3578] **** PoolMessage REQ ATTACH LWS
            <ApplicationPoolMessageHandler> <doPoolMessage> [3579] **** PoolMessage REQ DETACH LWS
            <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
            javax.servlet.ServletException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[2909 ].
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                 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)
            Caused by: oracle.jbo.TooManyObjectsException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25013. Error message parameters are {0=oracle.jbo.Key[2909 ]}
                 at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:604)
                 at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:613)
                 at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1020)
                 at oracle.jbo.server.EntityCache.add(EntityCache.java:537)
                 at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1207)
                 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 OrgDetails.onRowCreate(OrgDetails.java:1650)
                 at OrgDetails.addMember(OrgDetails.java:1624)
                 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 org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
                 at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
                 at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
                 at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
                 at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
                 at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
                 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                 ... 38 more
            
            the error is in this like Row newRow = rsi.createRow();
            Edited by: adf009 on 2013/02/14 2:48 PM
            • 3. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
              izzzooo
              What is your pk for this new row? For exp your pk is username and you logged in with this username and you want to insert new row with this username also give more detail about your vo's.
              • 4. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                Tshifhiwa
                ok am adding value to this vo
                PK IS USERNAME,ORGANISATIONID
                <ViewObject
                  xmlns="http://xmlns.oracle.com/bc4j"
                  Name="DeltMember"
                  Version="11.1.1.61.92"
                  InheritPersonalization="true"
                  SelectList="UamOrganisationUser.USERNAME, 
                       UamOrganisationUser.ORGUSERROLE, 
                       UamOrganisationUser.CREATED_DATE, 
                       UamUserdetails.FIRSTNAME, 
                       UamUserdetails.USERNAME AS USERNAME1, 
                       UamUserdetails.SURNAME, 
                       UamUserdetails.EMAILADDRESS, 
                       UamOrganisationUser.ORGANISATIONID, 
                       UamOrganisations.ORGANISATIONID AS ORGANISATIONID1, 
                       UamOrganisations.ORGANISATIONNAME"
                  FromList="UAM_ORGANISATION_USER UamOrganisationUser, UAM_USERDETAILS UamUserdetails, UAM_ORGANISATIONS UamOrganisations"
                  Where="(UamOrganisationUser.USERNAME = UamUserdetails.USERNAME) AND (UamOrganisationUser.ORGANISATIONID = UamOrganisations.ORGANISATIONID)"
                  BindingStyle="OracleName"
                  CustomQuery="false"
                  PageIterMode="Full"
                  UseGlueCode="false"
                  RowClass="uam.model.UpdOrgDetails.DeltMemberRowImpl"
                  ComponentClass="uam.model.UpdOrgDetails.DeltMemberImpl">
                  <DesignTime>
                    <Attr Name="_codeGenFlag2" Value="Access|Coll|Prog|VarAccess"/>
                    <Attr Name="_isCodegen" Value="true"/>
                  </DesignTime>
                  <Properties>
                    <SchemaBasedProperties>
                      <LABEL
                        ResId="uam.model.UpdOrgDetails.DeltMember_LABEL"/>
                    </SchemaBasedProperties>
                  </Properties>
                  <EntityUsage
                    Name="UamOrganisationUser"
                    Entity="uam.model.entities.UamOrganisationUser"/>
                  <EntityUsage
                    Name="UamUserdetails"
                    Entity="uam.model.entities.UamUserdetails"
                    Association="uam.model.entities.OrguserlinkUserdetailsFkAssoc"
                    AssociationEnd="uam.model.entities.OrguserlinkUserdetailsFkAssoc.UamUserdetails"
                    SourceUsage="uam.model.UpdOrgDetails.DeltMember.UamOrganisationUser"
                    DeleteParticipant="false"
                    JoinType="INNER JOIN">
                    <DesignTime>
                      <AttrArray Name="_srcAttributes">
                        <Item
                          Value="uam.model.entities.UamOrganisationUser.Username"/>
                      </AttrArray>
                      <AttrArray Name="_dstAttributes">
                        <Item
                          Value="uam.model.entities.UamUserdetails.Username"/>
                      </AttrArray>
                    </DesignTime>
                  </EntityUsage>
                  <EntityUsage
                    Name="UamOrganisations"
                    Entity="uam.model.entities.UamOrganisations"
                    Association="uam.model.entities.OrguserlinkOrganisationsFkAssoc"
                    AssociationEnd="uam.model.entities.OrguserlinkOrganisationsFkAssoc.UamOrganisations"
                    SourceUsage="uam.model.UpdOrgDetails.DeltMember.UamOrganisationUser"
                    DeleteParticipant="false"
                    JoinType="INNER JOIN">
                    <DesignTime>
                      <AttrArray Name="_srcAttributes">
                        <Item
                          Value="uam.model.entities.UamOrganisationUser.Organisationid"/>
                      </AttrArray>
                      <AttrArray Name="_dstAttributes">
                        <Item
                          Value="uam.model.entities.UamOrganisations.Organisationid"/>
                      </AttrArray>
                    </DesignTime>
                  </EntityUsage>
                  <ViewAttribute
                    Name="Username"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Username"
                    EntityUsage="UamOrganisationUser"
                    AliasName="USERNAME"/>
                  <ViewAttribute
                    Name="Orguserrole"
                    PrecisionRule="true"
                    EntityAttrName="Orguserrole"
                    EntityUsage="UamOrganisationUser"
                    AliasName="ORGUSERROLE"/>
                  <ViewAttribute
                    Name="CreatedDate"
                    PrecisionRule="true"
                    EntityAttrName="CreatedDate"
                    EntityUsage="UamOrganisationUser"
                    AliasName="CREATED_DATE">
                    <TransientExpression><![CDATA[adf.currentDate]]></TransientExpression>
                  </ViewAttribute>
                  <ViewAttribute
                    Name="Firstname"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Firstname"
                    EntityUsage="UamUserdetails"
                    AliasName="FIRSTNAME"/>
                  <ViewAttribute
                    Name="Username1"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Username"
                    EntityUsage="UamUserdetails"
                    AliasName="USERNAME1"/>
                  <ViewAttribute
                    Name="Surname"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Surname"
                    EntityUsage="UamUserdetails"
                    AliasName="SURNAME"/>
                  <ViewAttribute
                    Name="Emailaddress"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Emailaddress"
                    EntityUsage="UamUserdetails"
                    AliasName="EMAILADDRESS"/>
                  <ViewAttribute
                    Name="Organisationid"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Organisationid"
                    EntityUsage="UamOrganisationUser"
                    AliasName="ORGANISATIONID"/>
                  <ViewAttribute
                    Name="Organisationid1"
                    IsUpdateable="while_insert"
                    IsNotNull="true"
                    PrecisionRule="true"
                    EntityAttrName="Organisationid"
                    EntityUsage="UamOrganisations"
                    AliasName="ORGANISATIONID1"/>
                  <ViewAttribute
                    Name="Organisationname"
                    IsUnique="true"
                    PrecisionRule="true"
                    EntityAttrName="Organisationname"
                    EntityUsage="UamOrganisations"
                    AliasName="ORGANISATIONNAME"/>
                  <ResourceBundle>
                    <PropertiesBundle
                      PropertiesFile="model.ModelBundle"/>
                  </ResourceBundle>
                </ViewObject>
                Edited by: adf009 on 2013/02/14 3:21 PM
                • 5. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                  Vino Sarathy
                  Hi,
                  In ur Database you already having a row with pk value as 2909. If u have sequence for pk attribute check that sequence give unique value. this error occures only when we try to commit the record which is already available in DB(PK value)

                  - Vinoth
                  • 6. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                    Dileep Rongali
                    Hi,

                    This could be because of ObjectVersionNumber also.

                    Go to your Entity object and edit ObjectVersionNumber and check 'Change Indicator'.

                    Once I got the same error and it got resolved when I check Change Indicator.

                    Hope this will help you.


                    Dileep.
                    • 7. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                      Tshifhiwa
                      where is Entity object ObjectVersionNumber am i jdeveloper 11.1.1.6.0
                      • 8. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                        SivaChandranS
                        For change indicator,

                        entity object -> attributes ->edit any attribute (in your case edit primary key)->change indicator (Entity Attribute)

                        regards
                        Siva
                        • 9. Re: JBO-25013: Too many objects match the primary key oracle.jbo.Key
                          Tshifhiwa
                          i did as suggested but still geting the same error
                          <Attribute
                              Name="Username"
                              IsNotNull="true"
                              Precision="20"
                              ColumnName="USERNAME"
                              SQLType="VARCHAR"
                              Type="java.lang.String"
                              ColumnType="VARCHAR2"
                              TableName="UAM_ORGANISATION_USER"
                              PrimaryKey="true"
                              ChangeIndicator="true">
                              <DesignTime>
                                <Attr Name="_DisplaySize" Value="20"/>
                              </DesignTime>
                            </Attribute>
                          
                          javax.servlet.ServletException: oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[2909 ].
                               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                               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)
                          Caused by: javax.faces.el.EvaluationException: oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[2909 ].
                               at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
                               at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
                               at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
                               at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
                               at org.apache.myfaces.trinidad.component.UIXTable.broadcast(UIXTable.java:279)
                               at oracle.adf.view.rich.component.UIXTable.broadcast(UIXTable.java:145)
                               at oracle.adf.view.rich.component.rich.data.RichTable.broadcast(RichTable.java:402)
                               at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
                               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
                               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
                               at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
                               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
                               ... 38 more
                          Caused by: oracle.jbo.TooManyObjectsException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25013. Error message parameters are {0=oracle.jbo.Key[2909 ]}
                               at oracle.jbo.server.EntityCache.throwTooManyObjectsException(EntityCache.java:604)
                               at oracle.jbo.server.EntityCache.handleDuplicateKey(EntityCache.java:613)
                               at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1020)
                               at oracle.jbo.server.EntityCache.add(EntityCache.java:537)
                               at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1207)
                               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 uam.cadastre.gov.za.OrgDetails.onRowCreate(OrgDetails.java:1659)
                               at uam.cadastre.gov.za.OrgDetails.testadd(OrgDetails.java:1743)
                               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.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
                               ... 49 more