-
Bug
-
Resolution: Done
-
Major
-
3.0.2.Final
If my resource is EJB with JAX-RS annotations on it's interface then I get ConstraintDeclarationException.
If I specify @ValidateRequest on Impl then there is no validation at all.
This might be related to https://hibernate.atlassian.net/browse/HV-448
@Stateless
public class UserResourceImpl implements UserResource {
@Override
public User register(@Nonnull String email, @Nonnull String password) throws EmailAleadyRegisteredException
{}
}
@RolesAllowed(Roles.USER)
@Path("/user")
public interface UserResource {
@ValidateRequest
@Consumes(
)
@PermitAll
@POST
@Path("/")
User register(@NotNull @FormParam("email") String email, @NotNull @FormParam("password") String password) throws EmailAleadyRegisteredException;
}
Call to such method results in:
javax.validation.ConstraintDeclarationException: Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints, but there are parameter constraints defined at all of the following overridden methods: [MethodMetaData [method=public abstract example.server.rest.domain.User example.server.rest.UserResource.register(java.lang.String,java.lang.String) throws example.server.business.EmailAleadyRegisteredException, parameterMetaData=[ParameterMetaData [type=class java.lang.String], [index=0], name=arg0], constraints=[NotNull], isCascading=false], ParameterMetaData [type=class java.lang.String], [index=1], name=arg1], constraints=[NotNull], isCascading=false]], constraints=[], isCascading=false, hasParameterConstraints=true], MethodMetaData [method=public example.server.rest.domain.User example.server.rest.UserResource$$$view306.register(java.lang.String,java.lang.String) throws example.server.business.EmailAleadyRegisteredException, parameterMetaData=[ParameterMetaData [type=class java.lang.String], [index=0], name=arg0], constraints=[NotNull], isCascading=false], ParameterMetaData [type=class java.lang.String], [index=1], name=arg1], constraints=[NotNull], isCascading=false]], constraints=[], isCascading=false, hasParameterConstraints=true]]
- is cloned by
-
RESTEASY-1101 Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints
- Closed
-
RESTEASY-1131 Only the root method of an overridden method in an inheritance hierarchy may be annotated with parameter constraints: Part 2
- Closed