1 Reply Latest reply: Dec 3, 2012 2:31 AM by Frank Nimphius-Oracle RSS

    ORA-02291: integrity constraint (constraintname_FK) violated - pa

    Tshifhiwa
      HI am creating a record using a bean,when i try to save the record am geting this error am in jdeveloper 11.1.1.6.0

      i got this printout
      n :OTC
      *****createAcc Entity [oracle.jbo.Key[10407 ]]
      *****createAcc UamCadastreaccounts
      @@@@@@@@@@@@OTC
      @@@@@@@@@@@@10408
      sendOrgsubtype DCS
      category GOVT
      insertedcat GOVT
      after JBO-26048: Constraint "ORG_ORGSUBTYPE_FK" is violated during post operation "Insert" using SQL statement "BEGIN INSERT INTO UAM_ORGANISATIONS(ORGANISATIONID,CADASTREACCOUNT,ORGANISATIONNAME,ORGANISATIONEMAIL,REGISTRATIONSTATUS,STATUS,ORGSUBTYPECODE,ORGANISATIONTYPECODE) VALUES (:1,:2,:3,:4,:5,:6,:7,:8) RETURNING ORGANISATIONID, REGISTRATIONSTATUS, ORGSUBTYPECODE INTO :9, :10, :11; END;".
      oracle.jbo.DMLConstraintException: JBO-26048: Constraint "ORG_ORGSUBTYPE_FK" is violated during post operation "Insert" using SQL statement "BEGIN INSERT INTO UAM_ORGANISATIONS(ORGANISATIONID,CADASTREACCOUNT,ORGANISATIONNAME,ORGANISATIONEMAIL,REGISTRATIONSTATUS,STATUS,ORGSUBTYPECODE,ORGANISATIONTYPECODE) VALUES (:1,:2,:3,:4,:5,:6,:7,:8) RETURNING ORGANISATIONID, REGISTRATIONSTATUS, ORGSUBTYPECODE INTO :9, :10, :11; END;".
           at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:564)
           at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
           at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
           at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
           at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
           at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
           at oracle.jbo.server.DBTransactionImpl.commitAndSaveChangeSet(DBTransactionImpl.java:2390)
           at CreateOrganisationBean.addOrginisation(CreateOrganisationBean.java:97)
           at OrgDetails.getNextStopPayment(OrgDetails.java:485)
           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)
           at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
           at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
           at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
           at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
           at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
           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)
           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)

      am geting the error in this line am.getDBTransaction().commit();

      Edited by: adf0994 on 2012/11/30 4:49 PM

      Edited by: adf0994 on 2012/11/30 4:50 PM

      Edited by: adf0994 on 2012/11/30 4:51 PM

      Edited by: adf0994 on 2012/11/30 4:52 PM

      Edited by: adf0994 on 2012/11/30 5:32 PM

      Edited by: adf0994 on 2012/11/30 5:34 PM

      Edited by: adf0994 on 2012/12/01 9:39 AM