Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-11668

startup-service does not work without runtime-data-id

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 18.12, Release Branch 17.12, Trunk
    • Fix Version/s: 18.12.01, 17.12.04
    • Component/s: framework/service
    • Labels:
      None

      Description

      startup-service has runtime-data-id as an optional parameter(Find more info at service-config.xsd).

      Example:

      <startup-service name="getAllCategories" runtime-delay="0" run-in-pool="pool"/>

      If we do not provide runtime-data-id while defining startup-service we got following error:

      E Failure in createSetNextSeqId operation for entity [JobSandbox]: org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:JobSandbox][createdStamp,2020-05-08 11:43:05.631(java.sql.Timestamp)][createdTxStamp,2020-05-08 11:43:05.629(java.sql.Timestamp)][currentRetryCount,0(java.lang.Long)][jobId,34100(java.lang.String)][jobName,1588918385514(java.lang.String)][lastUpdatedStamp,2020-05-08 11:43:05.631(java.sql.Timestamp)][lastUpdatedTxStamp,2020-05-08 11:43:05.629(java.sql.Timestamp)][loaderName,default(java.lang.String)][maxRetry,-1(java.lang.Long)][poolId,pool(java.lang.String)][recurrenceInfoId,null()][runTime,2020-05-08 11:43:06.514(java.sql.Timestamp)][runtimeDataId,(java.lang.String)][serviceName,getAllCategories(java.lang.String)][statusId,SERVICE_PENDING(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.JOB_SANDBOX (JOB_ID, JOB_NAME, RUN_TIME, POOL_ID, STATUS_ID, PARENT_JOB_ID, PREVIOUS_JOB_ID, SERVICE_NAME, LOADER_NAME, MAX_RETRY, CURRENT_RETRY_COUNT, AUTH_USER_LOGIN_ID, RUN_AS_USER, RUNTIME_DATA_ID, RECURRENCE_INFO_ID, TEMP_EXPR_ID, CURRENT_RECURRENCE_COUNT, MAX_RECURRENCE_COUNT, RUN_BY_INSTANCE_ID, START_DATE_TIME, FINISH_DATE_TIME, CANCEL_DATE_TIME, JOB_RESULT, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'JOB_SANDBOX' caused a violation of foreign key constraint 'JOB_SNDBX_RNTMDTA' for key (). The statement has been rolled back.)). Rolling back transaction.
      org.apache.ofbiz.entity.GenericEntityException: Error while inserting: [GenericEntity:JobSandbox][createdStamp,2020-05-08 11:43:05.631(java.sql.Timestamp)][createdTxStamp,2020-05-08 11:43:05.629(java.sql.Timestamp)][currentRetryCount,0(java.lang.Long)][jobId,34100(java.lang.String)][jobName,1588918385514(java.lang.String)][lastUpdatedStamp,2020-05-08 11:43:05.631(java.sql.Timestamp)][lastUpdatedTxStamp,2020-05-08 11:43:05.629(java.sql.Timestamp)][loaderName,default(java.lang.String)][maxRetry,-1(java.lang.Long)][poolId,pool(java.lang.String)][recurrenceInfoId,null()][runTime,2020-05-08 11:43:06.514(java.sql.Timestamp)][runtimeDataId,(java.lang.String)][serviceName,getAllCategories(java.lang.String)][statusId,SERVICE_PENDING(java.lang.String)] (SQL Exception while executing the following:INSERT INTO OFBIZ.JOB_SANDBOX (JOB_ID, JOB_NAME, RUN_TIME, POOL_ID, STATUS_ID, PARENT_JOB_ID, PREVIOUS_JOB_ID, SERVICE_NAME, LOADER_NAME, MAX_RETRY, CURRENT_RETRY_COUNT, AUTH_USER_LOGIN_ID, RUN_AS_USER, RUNTIME_DATA_ID, RECURRENCE_INFO_ID, TEMP_EXPR_ID, CURRENT_RECURRENCE_COUNT, MAX_RECURRENCE_COUNT, RUN_BY_INSTANCE_ID, START_DATE_TIME, FINISH_DATE_TIME, CANCEL_DATE_TIME, JOB_RESULT, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'JOB_SANDBOX' caused a violation of foreign key constraint 'JOB_SNDBX_RNTMDTA' for key (). The statement has been rolled back.))

        Attachments

        1. OFBIZ-11668.patch
          1 kB
          Pawan Verma

          Activity

            People

            • Assignee:
              pawan Pawan Verma
              Reporter:
              pawan Pawan Verma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: