Java.lang.NoClassDefFoundError:Could not initialize class ORG.HIBERNATE.VALIDATOR.INTERNAL.ENGINE.M

Source: Internet
Author: User

Javax.validation.Validator.validator.validate (object, groups) Bean validation Note error, exception:

Java.lang.NoClassDefFoundError:Could not initialize Class Org.hibernate.validator.internal.engine.messageinterpolation.InterpolationTermat Org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.interpolateExpression ( resourcebundlemessageinterpolator.java:227) at Org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.interpolateMessage ( resourcebundlemessageinterpolator.java:187) at Org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.interpolate ( resourcebundlemessageinterpolator.java:115) at Org.hibernate.validator.internal.engine.ValidationContext.interpolate (validationcontext.java:370) at Org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolation (validationcontext.java:284 ) at Org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolations (Validationcontext.java : 246) at Org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint (Constrainttree.java:289) at Org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints ( constrainttree.java:133) at Org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints ( constrainttree.java:91) at Org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint ( metaconstraint.java:85) at Org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint ( validatorimpl.java:478) at Org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup (Validatorimpl.java : 424) at Org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup ( validatorimpl.java:388) at Org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext ( validatorimpl.java:340) at Org.hibernate.validator.internal.engine.ValidatorImpl.validate (validatorimpl.java:158 ) at Org.hibernate.cfg.beanvalidation.BeanValidationEventListener.validate (beanvalidationeventlistener.java:136)At Org.hibernate.cfg.beanvalidation.BeanValidationEventListener.onPreUpdate (Beanvalidationeventlistener.java : 102) at Org.hibernate.action.internal.EntityUpdateAction.preUpdate (entityupdateaction.java:228) at Org.hibernate.action.internal.EntityUpdateAction.execute (entityupdateaction.java:115) at Org.hibernate.engine.spi.ActionQueue.execute (actionqueue.java:362) at Org.hibernate.engine.spi.ActionQueue.executeActions (actionqueue.java:354) at Org.hibernate.engine.spi.ActionQueue.executeActions (actionqueue.java:276)


SOURCE Location:

private string Interpolateexpression (string message, pattern pattern, context context, locale locale) {Matcher Matcher = P Attern.matcher (message); StringBuffer sb = new StringBuffer (), while (Matcher.find ()) {String match = Matcher.group (1); Interpolationterm Express Ion = new Interpolationterm (match, Locale), if (Expression.needsevaluation ()) {String resolvedexpression = expression.i Nterpolate (context); resolvedexpression = Matcher.quotereplacement (resolvedexpression); Matcher.appendreplacement ( SB, resolvedexpression);}} Matcher.appendtail (SB); return sb.tostring ();}

Cause: The name value is empty and haswhen @Length,Need@NotNull Property, otherwise an exception is thrown

@NotNull (message = "Sample name is empty or nonexistent") @Length (Min=1, max=200) @ExcelField (title= "sample name", align=2, sort=10) public String GetName () {return name;}


Java.lang.NoClassDefFoundError:Could not initialize class ORG.HIBERNATE.VALIDATOR.INTERNAL.ENGINE.M

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.