diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java index 3e1c360f..34358806 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java @@ -79,6 +79,11 @@ class ConfigurationDAOBatchService { log.info("Registered MyBatis Mappers: {}", batchSqlSessionTemplate.getConfiguration().getMapperRegistry().getMappers()); + // NOTE: sometimes this mapper was not registered on startup. No reason why. Force loading if absent. + if (!batchSqlSessionTemplate.getConfiguration().hasMapper(ConfigurationNodeRecordMapper.class)) { + batchSqlSessionTemplate.getConfiguration().addMapper(ConfigurationNodeRecordMapper.class); + } + this.batchConfigurationNodeRecordMapper = batchSqlSessionTemplate.getMapper(ConfigurationNodeRecordMapper.class); this.batchConfigurationValueRecordMapper =