After upgrading springboot application, we are seeing below exception, old versions: hibernate-core(5.4.25.Final), spring-boot-starter-data-jpa(2.4.2) New versions: hibernate-core(6.6.12.Final), spring-boot-starter-data-jpa(3.3.4)
Exception:
@SqlResultSetMapping(name = "SearchResultMapping",
classes = {
@ConstructorResult(
targetClass = SearchBomResponseEntity.class,
columns = {
@ColumnResult(name = "xx", type = Long.class),
@ColumnResult(name = "xx", type = String.class),
@ColumnResult(name = "xxxx", type = Integer.class)
}
=====================================
.springframework.orm.jpa.JpaSystemException: Could not resolve specified result-set mapping name: SearchResultMapping
at .springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:341)
at .springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:241)
at .springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
at .springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at .springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:335)