Leo Neo wrote:What cause this exception, I can't manage to find out.
Have you already figured out your issue? Based on the exception message it seems you are experiencing a class loader issue. The first java.lang.Integer class might be loaded with a different class loader than the second one, and that's why you might get this exception (because both classes are loaded by different class loaders, these classes are not assignable to each other).
This SO question seems to cover a similar issue. And it seems a bug is filed against Hibernate 5.0 here.