springboot 3.0.0 + hibernate 6.1.5.Final + IBM DB2 error after migrating from springboot 2.7.0 + hibernate 5.6.9.Final
Description
Attachments
Activity
Fabien Seznec January 10, 2023 at 11:36 PM
Indeed ! Everything works correctly within our projects now. I’ll raise a green flag to my development team for a migration to springboot 3 when it is released with hibernate 6.1.7+.
Thank you very much !
Christian Beikov January 10, 2023 at 9:09 AM
We were able to reproducer the StackOverflow and we are now certain that is the reason for this issue, so please track that issue for further info.
Christian Beikov January 10, 2023 at 8:31 AM
I think this might be related to
Fabien Seznec January 9, 2023 at 11:42 PM
The stackoverflow on org.hibernate.sql.ast.spi.AbstractSqlAstTranslator.emulateFetchOffsetWithWindowFunctions
occurs when using any paged request (org.springframework.data.repository.PagingAndSortingRepository.findAll(Pageable pageable)).
I feel like it is related to the fix. If it is not the case, tell me I’ll file another issue.
Fabien Seznec January 9, 2023 at 10:48 PMEdited
Hello,
I have compiled locally and I can confirm that the issue is fixed in my minimal sample projects for DB2Dialect and DB2iDialect.
Good job, thank you very much !
However, in my production project I run into this (I'm working on isolating the problem) :
This seems related to the fix. Could this be a regression ?
I first posted this bug here on spring-data-jpa, but apparently it is an hibernate issue.
.
Steps to reproduce :
create a springboot 2.7.0 (hibernate 5.6.9.Final) project with a IBM db2 datasource and a simple JpaRepository
create a junit test just checking that the findAll() method does not throw
run the junit test, test is OK
migrate to springboot 3.0.0 (hibernate 6.1.5.Final)
run the junit test, test fails with :
Minimal sample project
I have isolated the issue and created a minimalist project to reproduce (attached).
If you have git, maven and docker (to easily setup a DB2 database) it should be easy to reproduce.
I have carefully written a README.md.