javax.validation.ValidationException: HV000028: Unexpected exception during isValid call.

Hibernate JIRA | Andy Riley | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Email addresses with large invlaid email cause a ValidationException instead of failing the validation test. For a field: "too long email************************************************************************************************************************" We get the following error. javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294) at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:164) at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:125) at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:604) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:469) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:312) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) at tmg.billing.ws.utilties.ValidationService.validate(ValidationService.java:21) at billing.ws.request.RequestCustomerValidationTest.testCustomerValidation(RequestCustomerValidationTest.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.IllegalArgumentException: The label in the input is too long at java.net.IDN.toASCIIInternal(IDN.java:298) at java.net.IDN.toASCII(IDN.java:101) at java.net.IDN.toASCII(IDN.java:127) at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:45) at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:24) at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:291) ... 38 more

    Hibernate JIRA | 5 years ago | Andy Riley
    javax.validation.ValidationException: HV000028: Unexpected exception during isValid call.
  2. 0

    Email addresses with large invlaid email cause a ValidationException instead of failing the validation test. For a field: "too long email************************************************************************************************************************" We get the following error. javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294) at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:164) at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:125) at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:604) at org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:469) at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:312) at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) at tmg.billing.ws.utilties.ValidationService.validate(ValidationService.java:21) at billing.ws.request.RequestCustomerValidationTest.testCustomerValidation(RequestCustomerValidationTest.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.IllegalArgumentException: The label in the input is too long at java.net.IDN.toASCIIInternal(IDN.java:298) at java.net.IDN.toASCII(IDN.java:101) at java.net.IDN.toASCII(IDN.java:127) at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:45) at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:24) at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:291) ... 38 more

    Hibernate JIRA | 5 years ago | Andy Riley
    javax.validation.ValidationException: HV000028: Unexpected exception during isValid call.
  3. 0

    In 4.3, {{EmailValidator}} was updated to pass the value through {{IDN.toAscii}} before applying the regular expression. The Javadocs for {{IDN.toAscii}} document a set of cases which can result in an {{IllegalArgumentException}} being thrown, but {{EmailValidator}} does not attempt to catch that exception. As a result, in certain circumstances, rather than returning {{false}} the validator throws an exception. That, in turn, results in this: {noformat} javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:164) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:125) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] Caused by: java.lang.IllegalArgumentException: The label in the input is too long at java.net.IDN.toASCIIInternal(IDN.java:298) ~[na:1.6.0_34] at java.net.IDN.toASCII(IDN.java:101) ~[na:1.6.0_34] at java.net.IDN.toASCII(IDN.java:127) ~[na:1.6.0_34] at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:45) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:24) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:291) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] {noformat} This situation was not possible in 4.2.

    Hibernate JIRA | 5 years ago | Bryan Turner
    javax.validation.ValidationException: HV000028: Unexpected exception during isValid call.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    In 4.3, {{EmailValidator}} was updated to pass the value through {{IDN.toAscii}} before applying the regular expression. The Javadocs for {{IDN.toAscii}} document a set of cases which can result in an {{IllegalArgumentException}} being thrown, but {{EmailValidator}} does not attempt to catch that exception. As a result, in certain circumstances, rather than returning {{false}} the validator throws an exception. That, in turn, results in this: {noformat} javax.validation.ValidationException: HV000028: Unexpected exception during isValid call. at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:164) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:125) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] Caused by: java.lang.IllegalArgumentException: The label in the input is too long at java.net.IDN.toASCIIInternal(IDN.java:298) ~[na:1.6.0_34] at java.net.IDN.toASCII(IDN.java:101) ~[na:1.6.0_34] at java.net.IDN.toASCII(IDN.java:127) ~[na:1.6.0_34] at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:45) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:24) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] at org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:291) ~[hibernate-validator-4.3.0.Final.jar:4.3.0.Final] {noformat} This situation was not possible in 4.2.

    Hibernate JIRA | 5 years ago | Bryan Turner
    javax.validation.ValidationException: HV000028: Unexpected exception during isValid call.
  6. 0

    Master branch socks related unit test failing

    GitHub | 3 years ago | Scottmitch
    java.lang.IllegalArgumentException: java.text.ParseException: A prohibited code point was found in the inputù…ø«ø§ù„

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      The label in the input is too long

      at java.net.IDN.toASCIIInternal()
    2. Java RT
      IDN.toASCII
      1. java.net.IDN.toASCIIInternal(IDN.java:298)
      2. java.net.IDN.toASCII(IDN.java:101)
      3. java.net.IDN.toASCII(IDN.java:127)
      3 frames
    3. Curator RPC Proxy
      EmailValidator.isValid
      1. org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:45)
      2. org.hibernate.validator.internal.constraintvalidators.EmailValidator.isValid(EmailValidator.java:24)
      2 frames
    4. Hibernate Validator Engine
      ValidatorImpl.validate
      1. org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:291)
      2. org.hibernate.validator.internal.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:294)
      3. org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:164)
      4. org.hibernate.validator.internal.engine.ConstraintTree.validateConstraints(ConstraintTree.java:125)
      5. org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:86)
      6. org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:442)
      7. org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:387)
      8. org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:351)
      9. org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:303)
      10. org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraint(ValidatorImpl.java:604)
      11. org.hibernate.validator.internal.engine.ValidatorImpl.validateCascadedConstraints(ValidatorImpl.java:469)
      12. org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:312)
      13. org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:133)
      13 frames
    5. tmg.billing.ws
      ValidationService.validate
      1. tmg.billing.ws.utilties.ValidationService.validate(ValidationService.java:21)
      1 frame
    6. billing.ws.request
      RequestCustomerValidationTest.testCustomerValidation
      1. billing.ws.request.RequestCustomerValidationTest.testCustomerValidation(RequestCustomerValidationTest.java:37)
      1 frame
    7. Java RT
      DelegatingMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3 frames
    8. JUnit
      JUnitCore.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      5. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      7. org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      8. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      9. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      10. org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      11. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      12. org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      13. org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      13 frames
    9. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
      1 frame
    10. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
      2 frames
    11. Java RT
      NativeMethodAccessorImpl.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2 frames
    12. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      1 frame