2 Replies Latest reply: Jan 30, 2013 2:59 AM by Frank Nimphius-Oracle RSS

    why double insert?

    977907
      hello
      i heva some code
      public void beforePhase(PagePhaseEvent event) {
              if (event.getPhaseId() == Lifecycle.PREPARE_RENDER_ID) {
                  Integer reqI = 
                      (Integer)AdfFacesContext.getCurrentInstance().getProcessScope().get("RequestId");
                  if (reqI != null) {
                      getClientQuestByReqId(reqI);
                  } else {
                      createClient();
                  }
              }
      
          }
      
      
      //*****************
       private void createClient() {
              ApplicationModule am = FacesUtil.getAM("AppModuleDataControl");
              createReq(am);
              createLoanApp(am);
              createLoanAppRel(am);
          }
      
      
      
      // and here i insert row....
      private void createReq(ApplicationModule am) {
              ReqViewImpl vo = (ReqViewImpl)am.findViewObject("ReqView");
              ReqViewRowImpl row = (ReqViewRowImpl)vo.createRow();
              row.setAttribute("ReqStatusCode", "0");
              row.setAttribute("ReqTypeCode", 41);
              row.setAttribute("UserId", getUserInfo().getId());
              row.setAttribute("ReqNumber", reqIdValue);
              row.setAttribute("ReqDate", getNowDate());
              row.setAttribute("ClientId", 1700);
              row.setAttribute("ReqInWorkFlag", 1);
              row.setAttribute("ReqFxCtrlFlag", 0);
              AdfFacesContext.getCurrentInstance().getProcessScope().put("RequestId", 
                                                                         row.getReqId().getValue());
              vo.insertRow(row);
              vo.getDBTransaction().commit();
              vo.closeRowSet();
             
          }
      but in log i get error
      13/01/26 05:51:50 [5302] INSERT buf Req>#i SQLStmtBufLen: 525, actual=152
      13/01/26 05:51:50 [5303] INSERT INTO REQ(REQ_ID,REQ_STATUS_CODE,REQ_TYPE_CODE,USER_ID,REQ_NUMBER,REQ_DATE,CLIENT_ID,REQ_IN_WORK_FLAG,REQ_FX_CTRL_FLAG) VALUES (?,?,?,?,?,?,?,?,?)
      13/01/26 05:51:50 [5304] Insert binding param 1: 24178
      13/01/26 05:51:50 [5305] Insert binding param 2: 0
      13/01/26 05:51:50 [5306] Insert binding param 3: 41
      13/01/26 05:51:50 [5307] Insert binding param 4: 30101
      13/01/26 05:51:50 [5308] Insert binding param 5: 24178
      13/01/26 05:51:50 [5309] Insert binding param 6: 2013-01-26
      13/01/26 05:51:50 [5310] Insert binding param 7: 1700
      13/01/26 05:51:50 [5311] Insert binding param 8: 1
      13/01/26 05:51:50 [5312] Insert binding param 9: 0
      13/01/26 05:51:50 [5313] OracleSQLBuilder Executing, Lock 2 DML on: REQ (Вставить)
      13/01/26 05:51:50 [5314] INSERT buf Req>#i SQLStmtBufLen: 165, actual=34
      13/01/26 05:51:50 [5315] INSERT INTO REQ(REQ_ID) VALUES (?)
      13/01/26 05:51:50 [5316] Insert binding param 1: 24179
      13/01/26 05:51:50 [5317] OracleSQLBuilderImpl.doEntityDML failed...
      13/01/26 05:51:50 [5318] X/Open SQL State is: 23000
      13/01/26 05:51:50 [5319] java.sql.SQLException: ORA-01400: невозможно вставить NULL в ("XEEEE"."REQ"."REQ_STATUS_CODE")
      why "13/01/26 05:51:50 [5315]" i get another insert?

      i use jdev 10.1.3.4