GAE上的Hibernate Validator 5?

时间:2015-12-11 10:08:52

标签: spring google-app-engine spring-mvc hibernate-validator

是否可以在GAE上运行Hibernate Validator 5.x?我尝试使用5.2.2.Final,当我运行它时,我得到以下异常:

java.lang.NoClassDefFoundError: java.util.ResourceBundle$Control is a restricted class. Please see the Google App Engine developer's guide for more details.
    at com.google.apphosting.runtime.security.shared.stub.java.util.ResourceBundle$Control.<clinit>(ResourceBundle.java)
    at org.hibernate.validator.resourceloading.PlatformResourceBundleLocator$AggregateResourceBundle.<clinit>(PlatformResourceBundleLocator.java:169)
    at org.hibernate.validator.resourceloading.PlatformResourceBundleLocator.loadBundle(PlatformResourceBundleLocator.java:132)
    at org.hibernate.validator.resourceloading.PlatformResourceBundleLocator.getResourceBundle(PlatformResourceBundleLocator.java:105)
    at org.hibernate.validator.messageinterpolation.AbstractMessageInterpolator.interpolateMessage(AbstractMessageInterpolator.java:264)
    at org.hibernate.validator.messageinterpolation.AbstractMessageInterpolator.interpolate(AbstractMessageInterpolator.java:228)
    at org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator.interpolate(LocaleContextMessageInterpolator.java:50)
    at org.hibernate.validator.internal.engine.ValidationContext.interpolate(ValidationContext.java:422)
    at org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolation(ValidationContext.java:300)
    at org.hibernate.validator.internal.engine.ValidationContext.createConstraintViolations(ValidationContext.java:261)
    at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint(ConstraintTree.java:456)
    at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:127)
    at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:87)
    at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:73)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:592)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:555)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:490)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:454)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:406)
    at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:204)
    at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:108)
    at org.springframework.validation.DataBinder.validate(DataBinder.java:866)

1 个答案:

答案 0 :(得分:1)

此问题已在最新的master中修复,修复程序将成为下一个Hibernate Validator版本的一部分。 HV-1023是问题编号,以防您想要跟踪它。