ClassCastException about $Proxy cannot be cast to java.lang.Object after migrate hibernate 5.2.6 to 5.4.2

Description

After I upgrade hibernate in my application from 5.2.6 to 5.4.2 without modify any line of code. I got below exception.

From investigation found that, the exception occur in ScrollableResultsIterator.java class in hibernate lib itself. The exception occur on result is casting on result returning as below.

Environment

Windows 8, tomcat 9.0.17, JRE 1.8.0, oracle ojdbc7-12.1.0.2, springframework 5.1.5.RELEASE

Assignee

Den Sathaporn Sa-ngounwong

Reporter

Den Sathaporn Sa-ngounwong

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure