Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-3339

Jakarta JAX-RS Resource method parameter with @Valid is executing validation 2 times


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • jaxrs

      Deploying a Web application in WildFly 28.0.0, let's assume the following JAX-RS resource class:

      public class DebugResource {


      public void create(@Valid User user) {




      When a POST request is executed, the User parameter is validated twice.
      It seems that Jakarta CDI container, which uses proxies, may be the source
      of this unexpected behavior as, at least, two instances will be created:
      * DebugResource$Proxy$_$$_WeldClientProxy

      • DebugResource$Proxy$_$$_WeldSubclass
        Could this be a bug?

            dkafe Dimitris Kafetzis
            zhaiku Haiku Z (Inactive)
            0 Vote for this issue
            3 Start watching this issue