steven
steven

Reputation: 87

Can I use Hibernate Validator 5 without EL?

Upgrading to the latest Hibernate Validator in my Java desktop application causes java.lang.NoClassDefFoundError: javax/el/PropertyNotFoundException. It turns out that by default, Hibernate Validator now depends on EL.

Can it be configured to not use EL? I'm okay with the previos version messaging format (without EL). I'm already using Groovy in my project. I believe including dependencies to EL in my current project is redundant since both serve the same purpose as scripting language.

Upvotes: 4

Views: 355

Answers (1)

Gunnar
Gunnar

Reputation: 19010

Out of the box, you can't use Hibernate Validator 5 without an EL implementation.

What you can do is to plug in a custom MessageInterpolator which doesn't make use of the expression language. There is also a feature request in our JIRA (HV-853) to add such a message interpolator to Hibernate Validator. Maybe you would be interested in helping out with this?

Upvotes: 1

Related Questions