Since migration to Spring Boot 2.6.5, calls to JpaRepository query method fail with exception java.lang.IllegalArgumentException: Parameter value [\] did not match expected type [java.lang.String (n/a)].

The issue is reproduced in unit test of reproducer project https://github.com/fstaudt/sb265-hibernate-failure : - first call to query method findAllByNameContaining(...) succeeds - next calls to query method fail

Unit tests pass if Spring Boot version is reverted to 2.6.4.

Issue can also be reproduced at runtime (tested with bootRun), it is not only in unit tests.

I wasn't able to identify the root cause.\ I'm not sure that issue is actually in Spring Boot (might as well be in Spring Data or in Hibernate).

Comment From: scottfrederick

This is a duplicate of https://github.com/spring-projects/spring-data-jpa/issues/2472. As discussed in that issue, overriding the Hibernate version to 5.6.5.Final in the example works around the issue.

Comment From: boskokg

Since this issue makes the runtime error and not the compile error, I think that spring-boot team should release a micro version with downgraded hibernate version even if there is a workaround (not known by many).

Comment From: wilkinsona

We can't do that as downgrading would expose everyone using Hibernate to all of the bugs that have been fixed since 5.6.5, some of which may not have a workaround. If using 5.6.5 is a better option for you than using 5.6.7 with a workaround for this specific problem, you should opt into that arrangement by overriding the Hibernate version.

Comment From: boskokg

Hello, Since hibernate released 5.6.9 with this fix, can we expect a new micro version comming soon, or we should override the hibernate dependency to 5.6.9?

Thanks in advance

Comment From: wilkinsona

We have 2.5.x and 2.6.x releases planned this week which, all being well, will include Hibernate 5.6.9.