Start a new topic
Answered

How to solve- !MESSAGE Error synchronizing RepoLoad 4309 for dloc Eternity?

org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size: expected 1, actual 2
  at org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java:100)
  at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:237)
  at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.queryForObject(NamedParameterJdbcTemplate.java:245)
  at com.semarchy.platform.integration.polling.dlbatch.RepoLoadDao.queryRepoLoad(RepoLoadDao.java:153)
  at com.semarchy.platform.integration.polling.dlbatch.DlBatchSynchronizer.checkRepoLoadOptimisticLocking(DlBatchSynchronizer.java:205)
  at com.semarchy.platform.integration.polling.dlbatch.DlBatchSynchronizer.lambda$6(DlBatchSynchronizer.java:199)
  at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
  at com.semarchy.platform.integration.polling.dlbatch.DlBatchSynchronizer.lambda$5(DlBatchSynchronizer.java:196)
  at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
  at com.semarchy.platform.integration.polling.dlbatch.DlBatchSynchronizer.synchronizeRepoLoad(DlBatchSynchronizer.java:196)
  at com.semarchy.platform.integration.polling.dlbatch.DlBatchSynchronizer.synchronizeDlBatchForDesynchronizedLoads(DlBatchSynchronizer.java:111)
  at com.semarchy.platform.integration.polling.IntegrationLoadDequeuer.dequeue(IntegrationLoadDequeuer.java:514)
  at com.semarchy.platform.integration.polling.AbstractIntegrationBatchPoller.dequeue(AbstractIntegrationBatchPoller.java:155)
  at com.semarchy.platform.integration.polling.quartz.QuartzIntegrationBatchPoller.execute(QuartzIntegrationBatchPoller.java:214)
  at com.semarchy.platform.integration.polling.quartz.QuartzIntegrationBatchPoller$SemarchyJob.execute(QuartzIntegrationBatchPoller.java:240)
  at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
  at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)



Best Answer
You must have grabbed a data location from another environment with pending loads or something so.
You have to pass this query to put it in order:
merge into sem_repository.MTA_INTEG_LOAD T using (    select        IL.UUID UUID,        IL.REVISION IL_REVISION,        IB.REVISION IB_REVISION    from sem_repository.MTA_INTEG_LOAD IL    inner join sem_repository.MTA_DATA_LOCATION DL on (IL.O_DATALOCATION = DL.UUID)    left join sem_repository.MTA_INTEG_BATCH IB on IB.R_INTEGLOAD = IL.UUID <span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span>   where        IL.CLASSNAME <> 'ContinuousLoad'        and DL. NAME in ('$$DL_NAMES$$')        and (            IL.LAST_DL_BATCH_SYNCED_REVISION is null            or IL.LAST_DL_BATCH_SYNCED_REVISION < IL.REVISION            or (IB.REVISION is not null and IL.LAST_DL_BATCH_SYNCED_REVISION < IB.REVISION)            ) ) S on (T.UUID = S.UUID) when matched then update set T.LAST_DL_BATCH_SYNCED_REVISION = GREATEST(COALESCE( IL_REVISION, 0), COALESCE(IB_REVISION, 0)); 
commit;


1 Comment

Answer
You must have grabbed a data location from another environment with pending loads or something so.
You have to pass this query to put it in order:
merge into sem_repository.MTA_INTEG_LOAD T using (    select        IL.UUID UUID,        IL.REVISION IL_REVISION,        IB.REVISION IB_REVISION    from sem_repository.MTA_INTEG_LOAD IL    inner join sem_repository.MTA_DATA_LOCATION DL on (IL.O_DATALOCATION = DL.UUID)    left join sem_repository.MTA_INTEG_BATCH IB on IB.R_INTEGLOAD = IL.UUID <span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;"></span><span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;"></span>   where        IL.CLASSNAME <> 'ContinuousLoad'        and DL. NAME in ('$$DL_NAMES$$')        and (            IL.LAST_DL_BATCH_SYNCED_REVISION is null            or IL.LAST_DL_BATCH_SYNCED_REVISION < IL.REVISION            or (IB.REVISION is not null and IL.LAST_DL_BATCH_SYNCED_REVISION < IB.REVISION)            ) ) S on (T.UUID = S.UUID) when matched then update set T.LAST_DL_BATCH_SYNCED_REVISION = GREATEST(COALESCE( IL_REVISION, 0), COALESCE(IB_REVISION, 0)); 
commit;


Login to post a comment