javax.validation.ValidationException

HV000136: The specified constraint annotation class MyConstraint cannot be loaded.

Solutions on the web70

  • via Hibernate JIRA by Zhelyazko Chobantonov, 9 months ago
    HV000136: The specified constraint annotation class MyConstraint cannot be loaded.
  • via Hibernate JIRA by Jeff Maxwell, 7 months ago
    HV000083: The specified annotation defines no parameter '$jacocoInit'.
  • HV000187: When using type annotation constraints on parameterized iterables or map @Valid must be used. Check com.example.sample.app.register.RegisterForm#roles
  • Stack trace

    • javax.validation.ValidationException: HV000136: The specified constraint annotation class MyConstraint cannot be loaded. at org.hibernate.validator.internal.xml.MetaConstraintBuilder.buildMetaConstraint(MetaConstraintBuilder.java:67) at org.hibernate.validator.internal.xml.ConstrainedTypeBuilder.buildConstrainedType(ConstrainedTypeBuilder.java:64) at org.hibernate.validator.internal.xml.XmlMappingParser.parse(XmlMappingParser.java:130) at org.hibernate.validator.internal.metadata.provider.XmlMetaDataProvider.<init>(XmlMetaDataProvider.java:51) at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.<init>(ValidatorFactoryImpl.java:144) at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:45) at org.hibernate.validator.internal.engine.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:236) at ValidationConfigurationIssues.testELContextFromXmlConfiguration(ValidationConfigurationIssues.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: javax.validation.ValidationException: HV000065: Unable to load class: java.lang.MyConstraint. at org.hibernate.validator.internal.util.privilegedactions.LoadClass.loadNonValidatorClass(LoadClass.java:100) at org.hibernate.validator.internal.util.privilegedactions.LoadClass.run(LoadClass.java:53) at org.hibernate.validator.internal.util.privilegedactions.LoadClass.run(LoadClass.java:29) at org.hibernate.validator.internal.util.ReflectionHelper.run(ReflectionHelper.java:674) at org.hibernate.validator.internal.util.ReflectionHelper.loadClass(ReflectionHelper.java:154) at org.hibernate.validator.internal.util.ReflectionHelper.loadClass(ReflectionHelper.java:186) at org.hibernate.validator.internal.util.ReflectionHelper.loadClass(ReflectionHelper.java:158) at org.hibernate.validator.internal.xml.MetaConstraintBuilder.buildMetaConstraint(MetaConstraintBuilder.java:64)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.