java.lang.AssertionError: Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator.

Hibernate JIRA | Gunnar Morling | 7 years ago
  1. 0

    In certain situations the AP fails when being integrated in Eclipse with the following exception: java.lang.AssertionError: Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator. at org.hibernate.validator.ap.util.ConstraintHelper.getConstraintValidatorSuperType(ConstraintHelper.java:497) at org.hibernate.validator.ap.util.ConstraintHelper.getSupportedType(ConstraintHelper.java:426) at org.hibernate.validator.ap.util.ConstraintHelper.getSupportedTypes(ConstraintHelper.java:402) at org.hibernate.validator.ap.util.ConstraintHelper.checkCustomConstraint(ConstraintHelper.java:356) at org.hibernate.validator.ap.util.ConstraintHelper.checkConstraint(ConstraintHelper.java:295) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.checkConstraintAtField(ConstraintAnnotationVisitor.java:290) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:174) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:45) at javax.lang.model.util.ElementKindVisitor6.visitVariable(ElementKindVisitor6.java:199) at org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:55) at org.hibernate.validator.ap.ConstraintValidationProcessor.process(ConstraintValidationProcessor.java:84) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:810) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:321) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) This happens, if the AP examines a constraint annotation, which is not defined in the currently built project itself, but is imported from some other JAR (e.g. @Length from HV): public class TestModel { @Length private String test; } The problem occurs, regardless whether the JAR containing the constraint is on the AP classpath or not. The AP works as expected when running on javac.

    Hibernate JIRA | 7 years ago | Gunnar Morling
    java.lang.AssertionError: Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator.
  2. 0

    In certain situations the AP fails when being integrated in Eclipse with the following exception: java.lang.AssertionError: Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator. at org.hibernate.validator.ap.util.ConstraintHelper.getConstraintValidatorSuperType(ConstraintHelper.java:497) at org.hibernate.validator.ap.util.ConstraintHelper.getSupportedType(ConstraintHelper.java:426) at org.hibernate.validator.ap.util.ConstraintHelper.getSupportedTypes(ConstraintHelper.java:402) at org.hibernate.validator.ap.util.ConstraintHelper.checkCustomConstraint(ConstraintHelper.java:356) at org.hibernate.validator.ap.util.ConstraintHelper.checkConstraint(ConstraintHelper.java:295) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.checkConstraintAtField(ConstraintAnnotationVisitor.java:290) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:174) at org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:45) at javax.lang.model.util.ElementKindVisitor6.visitVariable(ElementKindVisitor6.java:199) at org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:55) at org.hibernate.validator.ap.ConstraintValidationProcessor.process(ConstraintValidationProcessor.java:84) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:810) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:321) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301) at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) This happens, if the AP examines a constraint annotation, which is not defined in the currently built project itself, but is imported from some other JAR (e.g. @Length from HV): public class TestModel { @Length private String test; } The problem occurs, regardless whether the JAR containing the constraint is on the AP classpath or not. The AP works as expected when running on javac.

    Hibernate JIRA | 7 years ago | Gunnar Morling
    java.lang.AssertionError: Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator.
  3. 0

    Cast Iron Community:Cast Iron Studio:Weblogic JMS subscribe problems - Cast Iron Studio Forum

    ibm.com | 1 year ago
    java.lang.AssertionError: Class does not implement remote interface
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AssertionError

      Class org.hibernate.validator.constraints.impl.LengthValidator specified in @Constraint.validatedBy doesn't implement ConstraintValidator.

      at org.hibernate.validator.ap.util.ConstraintHelper.getConstraintValidatorSuperType()
    2. Hibernate Validator Annotation Processor
      ConstraintAnnotationVisitor.visitVariableAsField
      1. org.hibernate.validator.ap.util.ConstraintHelper.getConstraintValidatorSuperType(ConstraintHelper.java:497)
      2. org.hibernate.validator.ap.util.ConstraintHelper.getSupportedType(ConstraintHelper.java:426)
      3. org.hibernate.validator.ap.util.ConstraintHelper.getSupportedTypes(ConstraintHelper.java:402)
      4. org.hibernate.validator.ap.util.ConstraintHelper.checkCustomConstraint(ConstraintHelper.java:356)
      5. org.hibernate.validator.ap.util.ConstraintHelper.checkConstraint(ConstraintHelper.java:295)
      6. org.hibernate.validator.ap.ConstraintAnnotationVisitor.checkConstraintAtField(ConstraintAnnotationVisitor.java:290)
      7. org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:174)
      8. org.hibernate.validator.ap.ConstraintAnnotationVisitor.visitVariableAsField(ConstraintAnnotationVisitor.java:45)
      8 frames
    3. Java RT
      ElementKindVisitor6.visitVariable
      1. javax.lang.model.util.ElementKindVisitor6.visitVariable(ElementKindVisitor6.java:199)
      1 frame
    4. Eclipse ECJ
      VariableElementImpl.accept
      1. org.eclipse.jdt.internal.compiler.apt.model.VariableElementImpl.accept(VariableElementImpl.java:55)
      1 frame
    5. Hibernate Validator Annotation Processor
      ConstraintValidationProcessor.process
      1. org.hibernate.validator.ap.ConstraintValidationProcessor.process(ConstraintValidationProcessor.java:84)
      1 frame
    6. Eclipse ECJ
      BaseAnnotationProcessorManager.processAnnotations
      1. org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
      2. org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121)
      3. org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
      3 frames
    7. org.eclipse.jdt
      IdeAnnotationProcessorManager.processAnnotations
      1. org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
      1 frame
    8. JDT Core
      JavaBuilder.build
      1. org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:810)
      2. org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:428)
      3. org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:364)
      4. org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.compile(IncrementalImageBuilder.java:321)
      5. org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:301)
      6. org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build(IncrementalImageBuilder.java:134)
      7. org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas(JavaBuilder.java:265)
      8. org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:193)
      8 frames
    9. Core Resource Management
      BuildManager$2.run
      1. org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
      1 frame
    10. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    11. Core Resource Management
      BuildManager$1.run
      1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
      2. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
      3. org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
      3 frames
    12. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    13. Core Resource Management
      AutoBuildJob.run
      1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
      2. org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
      3. org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
      4. org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
      5. org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
      5 frames
    14. Eclipse Jobs
      Worker.run
      1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      1 frame