In katharsis validation module, when a jpa entity fails in validation, the ConstraintViolationExceptionMapper.java is invoked, and it tries to get the entity info with resourceRegistry.findEntry(clazz).
However this exception mapper is not working properly when using jpa entity with mapped dto support, the resource registry only contains the original entity class as entry, so findEntry() will always raise an error.
So this is actually a bug on resourceRegistry. it could be easily fixed by adding the mapped dto entry with exactly the same resource info when register jpa mapped entity repository in resourceRegistry.
In katharsis validation module, when a jpa entity fails in validation, the ConstraintViolationExceptionMapper.java is invoked, and it tries to get the entity info with
resourceRegistry.findEntry(clazz)
. However this exception mapper is not working properly when using jpa entity with mapped dto support, the resource registry only contains the original entity class as entry, sofindEntry()
will always raise an error.So this is actually a bug on
resourceRegistry
. it could be easily fixed by adding the mapped dto entry with exactly the same resource info when register jpa mapped entity repository in resourceRegistry.