This seems to be caused by the sessionImpl::connection method reference, where sessionImpl is a SessionImplementor type but the connection() method is inherited from SharedSessionContractImplementor since Hibernate ORM 5.2 there.
Taras Tielkes, have you seen this as a recent regression in Spring Framework 5.1.x? Does it work with Spring Framework 5.0.x still?
As far as I can see, a simple change to () -> sessionImpl.connection() solves the problem at bytecode level since it compiles to a SessionImplementor reference again. Assuming it still works with Spring Framework 5.0.x (where a similar direct call in in place), that's the change I intend to apply for the 5.1.4 release.