You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After swtiching to version 0.90-rc5, my server failed to load its configuration with the following error message :
Exception in thread "main" javax.validation.UnexpectedTypeException: HV000186:
The constraint of type 'javax.validation.constraints.NotNull' defined on 'client.userAgent'
has multiple matching constraint validators which is due to an additional value handler of type
'io.dropwizard.validation.valuehandling.OptionalValidatedValueUnwrapper'.
It is unclear which value needs validating. Clarify configuration via @UnwrapValidatedValue.
The configuration field which trigger the exception is a dropwizard HttpClientConfiguration with a @Valid annotation:
publicclassPetConfigurationextendsConfiguration {
@Valid// remove this annotation to avoid HV000186publicHttpClientConfigurationclient ;
}
The problem is caused by the annotation @NotNull on the property userAgent in class HttpClientConfiguration. It can be reproduced with a simple String parameter, like this :
publicclassPetConfigurationextendsConfiguration {
@NotNull@Valid// remove this annotation to avoid HV000186 publicOptional<String> foo = Optional.absent() ;
}
Everything is fine with the two configurations classes above using 0.90-rc4, I think it's a 0.90-rc5 regression, but I don't known the cause yet : to my knowledge, there was no change on HttpClientConfiguration.userAgent between rc4 and rc5 ...
The text was updated successfully, but these errors were encountered:
After swtiching to version 0.90-rc5, my server failed to load its configuration with the following error message :
The configuration field which trigger the exception is a dropwizard
HttpClientConfiguration
with a@Valid
annotation:The problem is caused by the annotation
@NotNull
on the property userAgent in class HttpClientConfiguration. It can be reproduced with a simple String parameter, like this :Everything is fine with the two configurations classes above using 0.90-rc4, I think it's a 0.90-rc5 regression, but I don't known the cause yet : to my knowledge, there was no change on HttpClientConfiguration.userAgent between rc4 and rc5 ...
The text was updated successfully, but these errors were encountered: