Disable hibernate validator when creating the hibernate session factory

Description

Hibernate has a plugin mechanism that autodetects hibernate-validator if it is on the classpath and wires it in automagically.

This behaviour causes this bug:
https://github.com/corda/corda/issues/4444

The fix for this is to add hibernate-validator to the system classpath. (dropping it in the "/lib" folder)

The issue with that is that it might cause subtle bugs in CorDapps who depend on hibernate validator outside of the hibernate logic.

The proposed fix is to disable hibernate's plugin mechanism.

The drawback is that CorDapps will not be able to rely on hibernate validator to validate the Queryable State entities.
That is an antipattern anyway because the state should be well formed in the first place on the ledger.

Status

Assignee

Tudor Malene

Reporter

Tudor Malene

Labels

Priority

Medium

Fix versions

Ported to...

Corda 4.1
Corda 4.3
Corda Enterprise 4
Corda Enterprise 4.1
Corda Enterprise 4.2
Corda Enterprise 4.0 Patch
Corda Enterprise 4.1 Patch
Corda Enterprise 4.2 patch

Feature Team

Kernel Group

CVSS Vector

None

Severity

Medium

Affects versions

Configure