glassfish
  1. glassfish
  2. GLASSFISH-20597

UnsatisfiedDependencyException is thrown by JAX-RS, Bean Validation and CDI integration

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 4.0_b89_RC5
    • Fix Version/s: 4.1
    • Component/s: bean-validator, cdi, jax-rs
    • Labels:
      None
    • Environment:

      Windows 7 and JDK7 update 21 (both x86 and x86-64)

      Description

      It is problem that a JAX-RS application (exactly a resource class) throws org.glassfish.hk2.api.UnsatisfiedDependencyException when I send GET request to it. The application uses both Bean Validation (@NotNull and @Min) and CDI (@Inject) into same resource class and it is neither Managed Bean nor EJB (Session Bean). If it uses either of them (for example, it uses without Bean Validation), it runs well and send response as status 200.

      As a trial, I rewrite the application using not @Inject but @EJB (the resource class becomes Stateless Bean) and then it runs as expected.

        Issue Links

          Activity

          HASUNUMA Kenji created issue -
          michael.y.chen made changes -
          Field Original Value New Value
          Assignee michael.y.chen [ michael.y.chen ] Marek Potociar [ m_potociar ]
          Marek Potociar made changes -
          Assignee Marek Potociar [ m_potociar ] Michal Gajdos [ michalgajdos ]
          Fix Version/s 4.0.1 [ 16061 ]
          Tags jax-rs beanvalidation cdi jax-rs beanvalidation cdi incomplete
          Marek Potociar made changes -
          Link This issue is related to JERSEY-1908 [ JERSEY-1908 ]
          Michal Gajdos made changes -
          Tags jax-rs beanvalidation cdi incomplete jax-rs beanvalidation cdi
          Michal Gajdos made changes -
          Link This issue duplicates GLASSFISH-20255 [ GLASSFISH-20255 ]
          Michal Gajdos made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Michal Gajdos made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Romain Grécourt made changes -
          Fix Version/s 4.1 [ 16387 ]
          Fix Version/s 4.0.1 [ 16061 ]

            People

            • Assignee:
              Michal Gajdos
              Reporter:
              HASUNUMA Kenji
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: