javax.validation.ValidationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have the following validation rules defined in an interface: {code} @NotNull @DecimalMax(value= "90.0") @DecimalMin(value= "-90.0") Double getLatitude(); {code} In my tests, I also pass unexpected values such as {{Double.NAN}} or {{Double.POSITIVE_INFINITY}}. This triggers an exception: {noformat} javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint(ConstraintTree.java:286) 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:83) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:547) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:487) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:451) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:403) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:206) {noformat} The exception is caused by the call to {{BigDecimal.valueOf(double val)}} in {{org.hibernate.validator.internal.constraintvalidators.bv.DecimalMaxValidatorForNumber}}, which throws an exception if val is infinite or NaN. The issue can be reproduced using the attached project.
    via by Xavier Sosnovsky,
  • I have the following validation rules defined in an interface: {code} @NotNull @DecimalMax(value= "90.0") @DecimalMin(value= "-90.0") Double getLatitude(); {code} In my tests, I also pass unexpected values such as {{Double.NAN}} or {{Double.POSITIVE_INFINITY}}. This triggers an exception: {noformat} javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint(ConstraintTree.java:286) 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:83) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:547) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:487) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:451) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:403) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:206) {noformat} The exception is caused by the call to {{BigDecimal.valueOf(double val)}} in {{org.hibernate.validator.internal.constraintvalidators.bv.DecimalMaxValidatorForNumber}}, which throws an exception if val is infinite or NaN. The issue can be reproduced using the attached project.
    via by Xavier Sosnovsky,
  • Spring ApplicationContext with AJAX call
    via Stack Overflow by user1482309
    ,
  • Steps to reproduce: 1. Go into user settings 2. Find a user and go to SSH keys tab 3. Try to paste in an SSH public key with a couple of spaces in the middle. 2014-08-13 10:20:41,501 ERROR [http-bio-7990-exec-4] @QB1BG0x620x117677x0 108aiad 95.175.4.101,127.0.0.1 "POST /mvc/error500 HTTP/1.1" c.a.s. i.web.ErrorPageController There was an unhandled exception loading [/stash/plugins/servlet/ssh/admin/users/zzz.xxxx/keys/add] javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:311) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:180) ~[hibernate-validator-4.3.1.Fi nal.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:124) ~[hibernate-validator-4.3.1.Fi nal.jar:4.3.1.Final] at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) ~[hibernate-validator-4.3.1.Final .jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) ~[hibernate-valid ator-4.3.1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) ~[hibernate-valid ator-4.3.1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) ~[hibernate-validator-4.3.1.Final. jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) ~[hibernate-validator-4.3.1.Final.jar:4.3.1 .Final] at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:208) ~[spring-context-4. 0.5.RELEASE.jar:4.0.5.RELEASE] at com.atlassian.stash.util.ValidationUtils.validate(ValidationUtils.java:33) ~[stash-util-3.2.0.jar:na] at com.atlassian.stash.internal.key.ssh.DefaultSshKeyService.internalAddForUser(DefaultSshKeyService.java:293) ~[na:na] at com.atlassian.stash.internal.key.ssh.DefaultSshKeyService.addForUser(DefaultSshKeyService.java:78) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.AddKeyRequestHandler.post(AddKeyRequestHandler.java:103) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.SshKeysController.doPost(SshKeysController.java:111) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.SshKeysController.service(SshKeysController.java:122) ~[na:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ~[na:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) ~[StashAuthenti cationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthentic ationFilter.java:111) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77 ) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[atlassian- trusted-apps-core-3.0.6.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) ~[na:na] at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) ~[na:na] at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) ~[atlassian-core-4.6.15.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthentica tionFilter.java:89) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75 ) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) ~[stash-service-impl-3.2.0.j ar:na] at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446) ~[hazelcast-wm-3.3-RC2.jar:3.3-RC2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] ... 209 frames trimmed Caused by: java.lang.RuntimeException: java.io.EOFException: Length to read: 257 actual: 146 at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBytes(KeyUtils.java:193) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBigInteger(KeyUtils.java:202) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.access$300(KeyUtils.java:175) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$RSAKeySpecDecoder.getSpec(KeyUtils.java:151) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$RSAKeySpecDecoder.getSpec(KeyUtils.java:141) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils.decodePublicKey(KeyUtils.java:111) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils.getPublicKey(KeyUtils.java:68) ~[na:na] at com.atlassian.stash.ssh.validation.PublicKeyValidator.isValid(PublicKeyValidator.java:19) ~[na:na] at com.atlassian.stash.ssh.validation.PublicKeyValidator.isValid(PublicKeyValidator.java:8) ~[na:na] at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:308) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] ... 30 common frames omitted Caused by: java.io.EOFException: Length to read: 257 actual: 146 at org.apache.commons.io.IOUtils.readFully(IOUtils.java:2539) ~[commons-io-2.4.jar:2.4] at org.apache.commons.io.IOUtils.readFully(IOUtils.java:2558) ~[commons-io-2.4.jar:2.4] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBytes(KeyUtils.java:189) ~[na:na] ... 39 common frames omitted
    via by Radosław Antoniuk,
  • Steps to reproduce: 1. Go into user settings 2. Find a user and go to SSH keys tab 3. Try to paste in an SSH public key with a couple of spaces in the middle. 2014-08-13 10:20:41,501 ERROR [http-bio-7990-exec-4] @QB1BG0x620x117677x0 108aiad 95.175.4.101,127.0.0.1 "POST /mvc/error500 HTTP/1.1" c.a.s. i.web.ErrorPageController There was an unhandled exception loading [/stash/plugins/servlet/ssh/admin/users/zzz.xxxx/keys/add] javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:311) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:180) ~[hibernate-validator-4.3.1.Fi nal.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:124) ~[hibernate-validator-4.3.1.Fi nal.jar:4.3.1.Final] at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) ~[hibernate-validator-4.3.1.Final .jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) ~[hibernate-valid ator-4.3.1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) ~[hibernate-valid ator-4.3.1.Final.jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) ~[hibernate-validator-4.3.1.Final. jar:4.3.1.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) ~[hibernate-validator-4.3.1.Final.jar:4.3.1 .Final] at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:208) ~[spring-context-4. 0.5.RELEASE.jar:4.0.5.RELEASE] at com.atlassian.stash.util.ValidationUtils.validate(ValidationUtils.java:33) ~[stash-util-3.2.0.jar:na] at com.atlassian.stash.internal.key.ssh.DefaultSshKeyService.internalAddForUser(DefaultSshKeyService.java:293) ~[na:na] at com.atlassian.stash.internal.key.ssh.DefaultSshKeyService.addForUser(DefaultSshKeyService.java:78) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.AddKeyRequestHandler.post(AddKeyRequestHandler.java:103) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.SshKeysController.doPost(SshKeysController.java:111) ~[na:na] at com.atlassian.stash.internal.ssh.servlet.SshKeysController.service(SshKeysController.java:122) ~[na:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ~[na:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) ~[StashAuthenti cationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthentic ationFilter.java:111) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77 ) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[atlassian- trusted-apps-core-3.0.6.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) ~[na:na] at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) ~[na:na] at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) ~[atlassian-core-4.6.15.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthentica tionFilter.java:89) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75 ) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) ~[stash-service-impl-3.2.0.j ar:na] at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446) ~[hazelcast-wm-3.3-RC2.jar:3.3-RC2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] ... 209 frames trimmed Caused by: java.lang.RuntimeException: java.io.EOFException: Length to read: 257 actual: 146 at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBytes(KeyUtils.java:193) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBigInteger(KeyUtils.java:202) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.access$300(KeyUtils.java:175) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$RSAKeySpecDecoder.getSpec(KeyUtils.java:151) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils$RSAKeySpecDecoder.getSpec(KeyUtils.java:141) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils.decodePublicKey(KeyUtils.java:111) ~[na:na] at com.atlassian.stash.ssh.utils.KeyUtils.getPublicKey(KeyUtils.java:68) ~[na:na] at com.atlassian.stash.ssh.validation.PublicKeyValidator.isValid(PublicKeyValidator.java:19) ~[na:na] at com.atlassian.stash.ssh.validation.PublicKeyValidator.isValid(PublicKeyValidator.java:8) ~[na:na] at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:308) ~[hibernate-validator-4.3 .1.Final.jar:4.3.1.Final] ... 30 common frames omitted Caused by: java.io.EOFException: Length to read: 257 actual: 146 at org.apache.commons.io.IOUtils.readFully(IOUtils.java:2539) ~[commons-io-2.4.jar:2.4] at org.apache.commons.io.IOUtils.readFully(IOUtils.java:2558) ~[commons-io-2.4.jar:2.4] at com.atlassian.stash.ssh.utils.KeyUtils$SimpleDataReader.readBytes(KeyUtils.java:189) ~[na:na] ... 39 common frames omitted
    via by Radosław Antoniuk,
  • GitHub comment 1939#235261421
    via GitHub by btyamadasun
    ,
  • Hello, I have mandatory field in object which I want to validate: {code} @NotNull private final LocalDate datumHinfahrt; {code} But when I'm trying to validate it using the Hibernate Validator I receive an exception: {noformat} javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception. at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1257) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:459) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:406) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:370) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:625) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:490) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:331) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:152) ... Caused by: java.lang.NullPointerException at ch.voev.oevp.services.wegsuche.serviceobjects.WegAnfrage.hashCode(WegAnfrage.java:223) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.buildHashCode(SingleThreadCachedTraversableResolver.java:153) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.<init>(SingleThreadCachedTraversableResolver.java:114) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.<init>(SingleThreadCachedTraversableResolver.java:96) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:41) at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1248){noformat} Problem is that {{Validator}} invokes {{hashCode()}} with {{null}} mandatory field. But purpose of validation is to check nullability of this field and produce a validation error. Current behavior is conceptually wrong from my point of view. Thanks in advance!
    via by oleg,
  • Hello, I have mandatory field in object which I want to validate: {code} @NotNull private final LocalDate datumHinfahrt; {code} But when I'm trying to validate it using the Hibernate Validator I receive an exception: {noformat} javax.validation.ValidationException: HV000041: Call to TraversableResolver.isReachable() threw an exception. at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1257) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:459) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:406) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:370) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:322) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:625) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:490) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:331) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:152) ... Caused by: java.lang.NullPointerException at ch.voev.oevp.services.wegsuche.serviceobjects.WegAnfrage.hashCode(WegAnfrage.java:223) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.buildHashCode(SingleThreadCachedTraversableResolver.java:153) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.<init>(SingleThreadCachedTraversableResolver.java:114) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver$TraversableHolder.<init>(SingleThreadCachedTraversableResolver.java:96) at org.hibernate.validator.internal.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:41) at org.hibernate.validator.internal.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1248){noformat} Problem is that {{Validator}} invokes {{hashCode()}} with {{null}} mandatory field. But purpose of validation is to check nullability of this field and produce a validation error. Current behavior is conceptually wrong from my point of view. Thanks in advance!
    via by oleg,
  • {{ConstraintDescriptorImpl.buildAnnotationParameterMap}} does not filter out sythetic methods. Resulting the following exception: {code} javax.validation.ValidationException: HV000083: The specified annotation defines no parameter '$jacocoInit'. at org.hibernate.validator.internal.util.privilegedactions.GetAnnotationParameter.run(GetAnnotationParameter.java:53) at org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl.run(ConstraintDescriptorImpl.java:741) at org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl.buildAnnotationParameterMap(ConstraintDescriptorImpl.java:562) at org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl.<init>(ConstraintDescriptorImpl.java:167) at org.hibernate.validator.internal.metadata.descriptor.ConstraintDescriptorImpl.<init>(ConstraintDescriptorImpl.java:211) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.buildConstraintDescriptor(AnnotationMetaDataProvider.java:661) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findConstraintAnnotations(AnnotationMetaDataProvider.java:587) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findConstraints(AnnotationMetaDataProvider.java:532) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.findExecutableMetaData(AnnotationMetaDataProvider.java:349) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getMetaData(AnnotationMetaDataProvider.java:329) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getMethodMetaData(AnnotationMetaDataProvider.java:315) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.retrieveBeanConfiguration(AnnotationMetaDataProvider.java:138) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfiguration(AnnotationMetaDataProvider.java:125) at org.hibernate.validator.internal.metadata.provider.AnnotationMetaDataProvider.getBeanConfigurationForHierarchy(AnnotationMetaDataProvider.java:108) at org.hibernate.validator.internal.metadata.BeanMetaDataManager.createBeanMetaData(BeanMetaDataManager.java:166) at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getOrCreateBeanMetaData(BeanMetaDataManager.java:194) at org.hibernate.validator.internal.metadata.BeanMetaDataManager.getBeanMetaData(BeanMetaDataManager.java:142) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:783) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:681) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:416) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:795) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:681) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:416) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:795) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:681) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:416) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:205) {code} Fix: {code} private Map<String, Object> buildAnnotationParameterMap(Annotation annotation) { final Method[] declaredMethods = run( GetDeclaredMethods.action( annotation.annotationType() ) ); Map<String, Object> parameters = newHashMap( declaredMethods.length ); for ( Method m : declaredMethods ) { //Add check for synthetic if(!m.isSynthetic()) { Object value = run( GetAnnotationParameter.action( annotation, m.getName(), Object.class ) ); parameters.put( m.getName(), value ); } } return Collections.unmodifiableMap( parameters ); } {code}
    via by Jeff Maxwell,
    • javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateSingleConstraint(ConstraintTree.java:286) 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:83) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:547) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:487) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:451) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:403) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:206)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    aldrinlealaldrinleal
    2 times, last one,