We have a entity named "Device" with a primary key of type "DevicePK", which in turn is an @Embeddable primary key type with a single field, Integer. A native query that changes completely different beans breaks into ClassCastException. Grabbing it with a debugger the reason seems to be a "fix" to issue HHH-10023; a workaround to bug ISPN-5676. A method that accepts only primary key objects is called with a parameter "false", ie. a boolean. Autoboxing makes it a Boolean and then Hibernate and Infinispan try to invoke getter for DevicePK.id but instead of object of type DevicePK, the Method is given the Boolean object as parameter.
Now, the ISPN-5676 has been already fixed in Infinispan 8.0.0.CR1 while 8.0.1.Final is the latest stable release. Could we just remove the workaround?
Here's a stack trace for the issue:
Ubuntu 15.10, Oracle Java SDK 8u66, Wildfly 10.0.0.CR4, Infinispan 8.0.1.Final.