ClassCastException in interface proxy method

Description

Using interface proxies together with polymorphism can lead to sporadic ClassCastExceptions.

This problem occurs whenever two mapped subclasses have an identical property and the instances are loaded polymorphically through the base class.

The attached testcase and mapping file can be used to reproduce the problem. You may need to run the test case a couple of times to reproduce the error — depending on the order in which the proxy factory iterates through the sub-interfaces, the test succeeds or yields an error.

Environment

None

Assignee

Unassigned

Reporter

LuísL

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

Priority

Critical
Configure