HV-1755 introduces NPE in org.hibernate.validator.internal.engine.ValidatorFactoryImpl constructor

Description

We use hibernate-validator as bean validation engine together with Apache TomEE

For example with hibernate-validator:6.0.21.Final, configurationState in #ValidatorFactoryImpl(ConfigurationSate) line 151 is an instance of "org.apache.bval.jsr.ConfigurationImpl" instead of "org.hibernate.validator.internal.engine.ConfigurationImpl".
This causes a NullPointerException in line 205:

Environment

Apache Tomcat (TomEE)/9.0.37 (8.0.4)

Activity

Show:
Guillaume Smet
December 16, 2020, 2:08 PM

I think you'd better use the Hibernate Validator configuration class but that's indeed a regression.

I prepared a set of PRs to fix it in all supported versions and added a test.

Ralf Taugerbeck
December 16, 2020, 4:18 PM
Edited

Thanks for fixing this. Regarding your comment about using Hibernate Validator configuration class: unfortunately, this is not on our plate. The initialization is done by Apache OpenEJB (TomEE):

Guillaume Smet
December 16, 2020, 4:37 PM

I just released 6.0.22.Final and 6.1.7.Final with the fix. They should be available on Maven Central tomorrow morning.

Guillaume Smet
December 16, 2020, 4:37 PM

Thanks for reporting it!

Ralf Taugerbeck
December 16, 2020, 7:27 PM

Great. Thanks for fixing it so quickly!

Fixed

Assignee

Guillaume Smet

Reporter

Ralf Taugerbeck

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Affects versions

Priority

Major
Configure