'How to fix HV000028: Unexpected exception during isValid call?
I get this error when trying to do HTTP request using DTO.
Simple example of DTO:
private String id;
@NotBlank
@EnumConstraint(message = "Invalid type for DTO", enumClazz = TypeEnum.class)
private String type;
@NotBlank
@Size(min = 1, max = 255)
private String name;
Following example works if I use DTO using locally created Java class and just import it. But I use dependency of another repository with DTOs that has javax.validation. @EnumConstraint and @Size validations work correctly. But @NotBlank validation throws unexpected error:
HV000028: Unexpected exception during isValid call
I thought it's a problem of @NotBlank annotation, so I've created custom validator with same logic - didn't help. Using another similar annotation @NotEmpty - also didn't fix the problem. I also tried to follow some topics by adding:
spring.jpa.properties.javax.persistence.validation.mode=none- adding @Bean to @Configuration - LocalValidatorFactoryBean. Nothing helped for me.
How could I fix this problem?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
